From 50916bcda5ee1271db4796ef2b1cce8e2dc4f2f5 Mon Sep 17 00:00:00 2001 From: Daniel Nicoletti Date: Fri, 29 Dec 2017 13:22:23 -0200 Subject: [PATCH] Mark ClientSideEncryption::isFolderEncrypted() as const --- src/libsync/clientsideencryption.cpp | 6 +++--- src/libsync/clientsideencryption.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsync/clientsideencryption.cpp b/src/libsync/clientsideencryption.cpp index 118a6084c2..0c07ec8b11 100644 --- a/src/libsync/clientsideencryption.cpp +++ b/src/libsync/clientsideencryption.cpp @@ -1279,9 +1279,9 @@ QVector 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); } diff --git a/src/libsync/clientsideencryption.h b/src/libsync/clientsideencryption.h index 7d5810a8da..b5ffab5dcd 100644 --- a/src/libsync/clientsideencryption.h +++ b/src/libsync/clientsideencryption.h @@ -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();