mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
chore: add getOrRegisterSetting function
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -103,6 +103,16 @@ class SettingsObject : public QObject {
|
||||
*/
|
||||
std::shared_ptr<Setting> getSetting(const QString& id) const;
|
||||
|
||||
/*!
|
||||
* \brief Gets the setting with the given ID.
|
||||
* \brief if is not registered yet it does that
|
||||
* \param id The ID of the setting to get.
|
||||
* \return A pointer to the setting with the given ID.
|
||||
* Returns null if there is no setting with the given ID.
|
||||
* \sa operator []()
|
||||
*/
|
||||
std::shared_ptr<Setting> getOrRegisterSetting(const QString& id, QVariant defVal = QVariant());
|
||||
|
||||
/*!
|
||||
* \brief Gets the value of the setting with the given ID.
|
||||
* \param id The ID of the setting to get.
|
||||
|
Reference in New Issue
Block a user