Changeset 5068 in ntrip for trunk/BNC/src/bncsettings.cpp
- Timestamp:
- Mar 30, 2013, 11:39:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncsettings.cpp
r5066 r5068 29 29 // First fill the options 30 30 // ---------------------- 31 if ( PGM_CORE->_settings.size() == 0) {31 if (BNC_CORE->_settings.size() == 0) { 32 32 reRead(); 33 33 } … … 43 43 void bncSettings::reRead() { 44 44 45 PGM_CORE->_settings.clear();46 47 QSettings settings( PGM_CORE->confFileName(), QSettings::IniFormat);45 BNC_CORE->_settings.clear(); 46 47 QSettings settings(BNC_CORE->confFileName(), QSettings::IniFormat); 48 48 49 49 // Read from File … … 53 53 while (it.hasNext()) { 54 54 QString key = it.next(); 55 PGM_CORE->_settings[key] = settings.value(key);55 BNC_CORE->_settings[key] = settings.value(key); 56 56 } 57 57 } … … 218 218 QMutexLocker locker(&_mutex); 219 219 220 if ( PGM_CORE->_settings.contains(key)) {221 return PGM_CORE->_settings[key];220 if (BNC_CORE->_settings.contains(key)) { 221 return BNC_CORE->_settings[key]; 222 222 } 223 223 else { … … 236 236 //////////////////////////////////////////////////////////////////////////// 237 237 void bncSettings::setValue_p(const QString &key, const QVariant& value) { 238 PGM_CORE->_settings[key] = value;238 BNC_CORE->_settings[key] = value; 239 239 } 240 240 … … 243 243 void bncSettings::remove(const QString& key ) { 244 244 QMutexLocker locker(&_mutex); 245 PGM_CORE->_settings.remove(key);245 BNC_CORE->_settings.remove(key); 246 246 } 247 247 … … 250 250 void bncSettings::sync() { 251 251 QMutexLocker locker(&_mutex); 252 QSettings settings( PGM_CORE->confFileName(), QSettings::IniFormat);252 QSettings settings(BNC_CORE->confFileName(), QSettings::IniFormat); 253 253 settings.clear(); 254 QMapIterator<QString, QVariant> it( PGM_CORE->_settings);254 QMapIterator<QString, QVariant> it(BNC_CORE->_settings); 255 255 while (it.hasNext()) { 256 256 it.next();
Note:
See TracChangeset
for help on using the changeset viewer.