Changeset 5452 in ntrip for trunk/GnssCenter/main/settings.cpp
- Timestamp:
- Sep 14, 2013, 3:28:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/main/settings.cpp
r5001 r5452 73 73 const QVariant& defaultValue) const { 74 74 QMutexLocker locker(&_mutex); 75 76 if (_app->_settings.contains( key)) {77 return _app->_settings[ key];75 QString fullKey = _groupName.isEmpty() ? key : _groupName + '/' + key; 76 if (_app->_settings.contains(fullKey)) { 77 return _app->_settings[fullKey]; 78 78 } 79 79 else { … … 86 86 void t_settings::setValue(const QString &key, const QVariant& value) { 87 87 QMutexLocker locker(&_mutex); 88 setValue_p(key, value); 89 } 90 91 // 92 //////////////////////////////////////////////////////////////////////////// 93 void t_settings::setValue_p(const QString &key, const QVariant& value) { 94 _app->_settings[key] = value; 88 QString fullKey = _groupName.isEmpty() ? key : _groupName + '/' + key; 89 _app->_settings[fullKey] = value; 95 90 } 96 91 … … 99 94 void t_settings::remove(const QString& key ) { 100 95 QMutexLocker locker(&_mutex); 101 _app->_settings.remove(key); 96 QString fullKey = _groupName.isEmpty() ? key : _groupName + '/' + key; 97 _app->_settings.remove(fullKey); 102 98 } 103 99 … … 115 111 settings.sync(); 116 112 } 113 114 // 115 //////////////////////////////////////////////////////////////////////////// 116 void t_settings::beginGroup(const QString& groupName) { 117 QMutexLocker locker(&_mutex); 118 _groupName = groupName; 119 } 120 121 // 122 //////////////////////////////////////////////////////////////////////////// 123 void t_settings::endGroup() { 124 QMutexLocker locker(&_mutex); 125 _groupName.clear(); 126 }
Note:
See TracChangeset
for help on using the changeset viewer.