mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 04:30:43 +00:00
Add utility to rename a preference setting
This commit is contained in:
parent
39542ba7db
commit
48b4d754b3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user