mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
Moved loadSetting to MyAvatar
This commit is contained in:
parent
75ce99cd62
commit
e4fa9e508e
3 changed files with 9 additions and 10 deletions
|
@ -731,6 +731,14 @@ void MyAvatar::saveData(QSettings* settings) {
|
|||
settings->endGroup();
|
||||
}
|
||||
|
||||
float loadSetting(QSettings* settings, const char* name, float defaultValue) {
|
||||
float value = settings->value(name, defaultValue).toFloat();
|
||||
if (glm::isnan(value)) {
|
||||
value = defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
void MyAvatar::loadData(QSettings* settings) {
|
||||
settings->beginGroup("Avatar");
|
||||
|
||||
|
|
|
@ -27,4 +27,4 @@ void SettingsBridge::removeFromSettings(const QString& key) {
|
|||
QSettings().remove(key);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,18 +17,9 @@
|
|||
#include <QVariant>
|
||||
|
||||
// TODO: remove
|
||||
#include <glm/glm.hpp>
|
||||
class Settings : public QSettings {
|
||||
|
||||
};
|
||||
float loadSetting(QSettings* settings, const char* name, float defaultValue) {
|
||||
float value = settings->value(name, defaultValue).toFloat();
|
||||
if (glm::isnan(value)) {
|
||||
value = defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
////
|
||||
|
||||
namespace SettingHandles {
|
||||
|
||||
|
|
Loading…
Reference in a new issue