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).
wilder
Ahmad Samir 4 years ago
parent 50f87107bd
commit 9bc2211ffb
  1. 2
      src/profile/Profile.cpp
  2. 2
      src/profile/Profile.h
  3. 8
      src/widgets/EditProfileDialog.cpp

@ -270,7 +270,7 @@ bool Profile::isEmpty() const
return _propertyValues.isEmpty();
}
Profile::PropertyMap Profile::setProperties() const
Profile::PropertyMap Profile::properties() const
{
return _propertyValues;
}

@ -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;

@ -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<Profile::Property, QVariant> iter(_tempProfile->setProperties());
QHashIterator<Profile::Property, QVariant> iter(_tempProfile->properties());
while (iter.hasNext()) {
iter.next();
_previewedProperties.remove(iter.key());
@ -1395,7 +1395,7 @@ void EditProfileDialog::updateButtonApply()
{
bool userModified = false;
QHashIterator<Profile::Property, QVariant> iter(_tempProfile->setProperties());
QHashIterator<Profile::Property, QVariant> iter(_tempProfile->properties());
while (iter.hasNext()) {
iter.next();

Loading…
Cancel
Save