diff --git a/src/gui/macOS/fileprovidereditlocallyjob.cpp b/src/gui/macOS/fileprovidereditlocallyjob.cpp index 441c44d22a..1045c14240 100644 --- a/src/gui/macOS/fileprovidereditlocallyjob.cpp +++ b/src/gui/macOS/fileprovidereditlocallyjob.cpp @@ -53,10 +53,17 @@ void FileProviderEditLocallyJob::start() const auto filename = relPathSplit.last(); Systray::instance()->createEditFileLocallyLoadingDialog(filename); + qCDebug(lcFileProviderEditLocallyJob) << "Getting file ocId for" << _relPath; + const auto idJob = new PropfindJob(_accountState->account(), _relPath, this); idJob->setProperties({ QByteArrayLiteral("http://owncloud.org/ns:id") }); connect(idJob, &PropfindJob::finishedWithError, this, &FileProviderEditLocallyJob::idGetError); connect(idJob, &PropfindJob::result, this, &FileProviderEditLocallyJob::idGetFinished); + + connect(this, &FileProviderEditLocallyJob::ocIdAcquired, + this, &FileProviderEditLocallyJob::openFileProviderFile); + + idJob->start(); } void FileProviderEditLocallyJob::showError(const QString &message, @@ -83,6 +90,8 @@ void FileProviderEditLocallyJob::idGetFinished(const QVariantMap &data) return; } + qCDebug(lcFileProviderEditLocallyJob) << "Got file ocId for" << _relPath << ocId; + emit ocIdAcquired(ocId); } } // namespace OCC::Mac diff --git a/src/gui/macOS/fileprovidereditlocallyjob.h b/src/gui/macOS/fileprovidereditlocallyjob.h index 1f3829999a..ead0f0e44b 100644 --- a/src/gui/macOS/fileprovidereditlocallyjob.h +++ b/src/gui/macOS/fileprovidereditlocallyjob.h @@ -47,6 +47,7 @@ private slots: void showError(const QString &message, const QString &informativeText); void idGetError(const QNetworkReply *const reply); void idGetFinished(const QVariantMap &data); + void openFileProviderFile(const QString &ocId); private: AccountStatePtr _accountState;