diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-05-12 00:22:33 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-04 16:33:01 +0300 |
commit | 9b74a596c6b7bfb2c73a5626860ca5f5cdc27784 (patch) | |
tree | e9c1f97e1843dae7a39dab7d4af9cd218d8b9ac4 /src/gui/accountsettings.h | |
parent | f96206705a149ea03a36fef9c55c3487291ef3d4 (diff) |
Forbid to encrypt or decrypt a non-empty folder.
The specs forbid the encryption or decryption of a
non empty folder. so...
1 - check for the sync status, if it's not synced return
as there's no way that I can say that there's items on the
server right now without waiting for the sync to finish
2 - verify if the folder is empty locally
as the user could have send some files to the folder.
Diffstat (limited to 'src/gui/accountsettings.h')
-rw-r--r-- | src/gui/accountsettings.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h index 798b867f0..2345e90bc 100644 --- a/src/gui/accountsettings.h +++ b/src/gui/accountsettings.h @@ -25,6 +25,7 @@ #include "quotainfo.h" #include "progressdispatcher.h" #include "owncloudgui.h" +#include "folderstatusmodel.h" class QModelIndex; class QNetworkReply; @@ -55,7 +56,7 @@ public: explicit AccountSettings(AccountState *accountState, QWidget *parent = 0); ~AccountSettings(); QSize sizeHint() const Q_DECL_OVERRIDE { return ownCloudGui::settingsDialogSize(); } - + bool canEncryptOrDecrypt(const FolderStatusModel::SubFolderInfo* folderInfo); signals: void folderChanged(); @@ -85,8 +86,8 @@ protected slots: void slotOpenAccountWizard(); void slotAccountAdded(AccountState *); void refreshSelectiveSyncStatus(); - void slotMarkSubfolderEncrpted(const QByteArray& fileId); - void slotMarkSubfolderDecrypted(const QByteArray& fileId); + void slotMarkSubfolderEncrpted(const FolderStatusModel::SubFolderInfo* folderInfo); + void slotMarkSubfolderDecrypted(const FolderStatusModel::SubFolderInfo* folderInfo); void slotSubfolderContextMenuRequested(const QModelIndex& idx, const QPoint& point); void slotCustomContextMenuRequested(const QPoint &); void slotFolderListClicked(const QModelIndex &indx); |