Add utility to rename a preference setting

This commit is contained in:
Seeker4 2019-07-14 20:23:23 -07:00
parent 39542ba7db
commit 48b4d754b3

View File

@ -86,6 +86,15 @@ class Preferences
}
}
//! \brief Rename a preference
void Rename (QString oldname, QString newname) {
if (contains(oldname)) {
QVariant val = Get(oldname);
Set(newname, val);
Erase(oldname);
}
}
//! \brief Opens, processes the XML for this Preferences group, loading all preferences stored therein.
//! \note If filename is empty, it will use the one specified in the constructor
//! \returns true if succesful