Mark ClientSideEncryption::isFolderEncrypted() as const

This commit is contained in:
Daniel Nicoletti 2017-12-29 13:22:23 -02:00 committed by Tomaz Canabrava
parent c6491d50bb
commit 50916bcda5
2 changed files with 4 additions and 4 deletions

View File

@ -1279,9 +1279,9 @@ QVector<EncryptedFile> FolderMetadata::files() const {
return _files;
}
bool ClientSideEncryption::isFolderEncrypted(const QString& path) {
auto it = _folder2encryptedStatus.find(path);
if (it == _folder2encryptedStatus.end())
bool ClientSideEncryption::isFolderEncrypted(const QString& path) const {
auto it = _folder2encryptedStatus.constFind(path);
if (it == _folder2encryptedStatus.constEnd())
return false;
return (*it);
}

View File

@ -81,7 +81,7 @@ public:
void fetchFolderEncryptedStatus();
// to be used together with FolderStatusModel::FolderInfo::_path.
bool isFolderEncrypted(const QString& path);
bool isFolderEncrypted(const QString& path) const;
void setFolderEncryptedStatus(const QString& path, bool status);
void forgetSensitiveData();