From 9bc2211ffbcb107830f36bf7455cda33084fcbc3 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Thu, 4 Aug 2022 18:18:41 +0200 Subject: [PATCH] Rename Profile::setProperties() to properties() That sounds more like a getter, which is what that method is. (I plan to add a setProperties() method that takes a PropertyMap arg). --- src/profile/Profile.cpp | 2 +- src/profile/Profile.h | 2 +- src/widgets/EditProfileDialog.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/profile/Profile.cpp b/src/profile/Profile.cpp index a89474e9..20e8eeab 100644 --- a/src/profile/Profile.cpp +++ b/src/profile/Profile.cpp @@ -270,7 +270,7 @@ bool Profile::isEmpty() const return _propertyValues.isEmpty(); } -Profile::PropertyMap Profile::setProperties() const +Profile::PropertyMap Profile::properties() const { return _propertyValues; } diff --git a/src/profile/Profile.h b/src/profile/Profile.h index 3e366aa2..f1d33969 100644 --- a/src/profile/Profile.h +++ b/src/profile/Profile.h @@ -432,7 +432,7 @@ public: virtual bool isPropertySet(Property p) const; /** Returns a map of the properties set in this Profile instance. */ - virtual PropertyMap setProperties() const; + virtual PropertyMap properties() const; /** Returns true if no properties have been set in this Profile instance. */ bool isEmpty() const; diff --git a/src/widgets/EditProfileDialog.cpp b/src/widgets/EditProfileDialog.cpp index 8164041b..6935beae 100644 --- a/src/widgets/EditProfileDialog.cpp +++ b/src/widgets/EditProfileDialog.cpp @@ -224,17 +224,17 @@ void EditProfileDialog::save() if (isNewProfile) { // New profile, we need to save it to disk, even if no settings // were changed and _tempProfile is empty - ProfileManager::instance()->changeProfile(_profile, _profile->setProperties()); + ProfileManager::instance()->changeProfile(_profile, _profile->properties()); } // no changes since last save return; } - ProfileManager::instance()->changeProfile(_profile, _tempProfile->setProperties()); + ProfileManager::instance()->changeProfile(_profile, _tempProfile->properties()); // ensure that these settings are not undone by a call // to unpreview() - QHashIterator iter(_tempProfile->setProperties()); + QHashIterator iter(_tempProfile->properties()); while (iter.hasNext()) { iter.next(); _previewedProperties.remove(iter.key()); @@ -1395,7 +1395,7 @@ void EditProfileDialog::updateButtonApply() { bool userModified = false; - QHashIterator iter(_tempProfile->setProperties()); + QHashIterator iter(_tempProfile->properties()); while (iter.hasNext()) { iter.next();