mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-12 22:24:28 +03:00
[CSE] Renane GetFolderEncryptStatus to GetFolderEncryptStatusJob
it's a network job after all
This commit is contained in:
parent
863e86138f
commit
7fe4dd2163
3 changed files with 11 additions and 11 deletions
|
@ -984,10 +984,10 @@ void ClientSideEncryption::getPublicKeyFromServer()
|
|||
|
||||
void ClientSideEncryption::fetchFolderEncryptedStatus() {
|
||||
_refreshingEncryptionStatus = true;
|
||||
auto getEncryptedStatus = new GetFolderEncryptStatus(_account, QString());
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatus::encryptStatusReceived,
|
||||
auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, QString());
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusReceived,
|
||||
this, &ClientSideEncryption::folderEncryptedStatusFetched);
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatus::encryptStatusError,
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusError,
|
||||
this, &ClientSideEncryption::folderEncryptedStatusError);
|
||||
getEncryptedStatus->start();
|
||||
}
|
||||
|
@ -1483,12 +1483,12 @@ bool GetMetadataApiJob::finished()
|
|||
return true;
|
||||
}
|
||||
|
||||
GetFolderEncryptStatus::GetFolderEncryptStatus(const AccountPtr& account, const QString& folder, QObject *parent)
|
||||
GetFolderEncryptStatusJob::GetFolderEncryptStatusJob(const AccountPtr& account, const QString& folder, QObject *parent)
|
||||
: OCC::AbstractNetworkJob(account, QStringLiteral("remote.php/webdav"), parent), _folder(folder)
|
||||
{
|
||||
}
|
||||
|
||||
void GetFolderEncryptStatus::start()
|
||||
void GetFolderEncryptStatusJob::start()
|
||||
{
|
||||
QNetworkRequest req;
|
||||
req.setPriority(QNetworkRequest::HighPriority);
|
||||
|
@ -1505,7 +1505,7 @@ void GetFolderEncryptStatus::start()
|
|||
AbstractNetworkJob::start();
|
||||
}
|
||||
|
||||
bool GetFolderEncryptStatus::finished()
|
||||
bool GetFolderEncryptStatusJob::finished()
|
||||
{
|
||||
qCInfo(lcCse()) << "GetFolderEncryptStatus of" << reply()->request().url() << "finished with status"
|
||||
<< reply()->error()
|
||||
|
|
|
@ -337,11 +337,11 @@ private:
|
|||
/* I cant use the propfind network job because it defaults to the
|
||||
* wrong dav url.
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT GetFolderEncryptStatus : public AbstractNetworkJob
|
||||
class OWNCLOUDSYNC_EXPORT GetFolderEncryptStatusJob : public AbstractNetworkJob
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GetFolderEncryptStatus (const AccountPtr &account, const QString& folder, QObject *parent = 0);
|
||||
explicit GetFolderEncryptStatusJob (const AccountPtr &account, const QString& folder, QObject *parent = 0);
|
||||
|
||||
public slots:
|
||||
void start() override;
|
||||
|
|
|
@ -194,12 +194,12 @@ void PropagateUploadFileCommon::start()
|
|||
*/
|
||||
QFileInfo info(_item->_file);
|
||||
|
||||
auto getEncryptedStatus = new GetFolderEncryptStatus(propagator()->account(),
|
||||
auto getEncryptedStatus = new GetFolderEncryptStatusJob(propagator()->account(),
|
||||
info.path());
|
||||
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatus::encryptStatusReceived,
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusReceived,
|
||||
this, &PropagateUploadFileCommon::slotFolderEncryptedStatusFetched);
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatus::encryptStatusError,
|
||||
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusError,
|
||||
this, &PropagateUploadFileCommon::slotFolderEncryptedStatusError);
|
||||
getEncryptedStatus->start();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue