mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Connect receipt of a file's ocId with file opening procedure in FileProviderEditLocallyJob
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
15382807fa
commit
e345cd43d8
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user