| 1481 | |
| 1482 | |
| 1483 | void Settings::setNewOption(const QString & name, const QVariant & value, |
| 1484 | bool isForceSetOption, QSettings * settings /*= m_currentProfile*/) |
| 1485 | { |
| 1486 | QMutexLocker locker(&m_mutex); |
| 1487 | |
| 1488 | if (isForceSetOption) |
| 1489 | { |
| 1490 | settings->setValue(name, value); |
| 1491 | } else { |
| 1492 | if (settings->contains(name) == false) |
| 1493 | { |
| 1494 | DEBUG_LOW_LEVEL << "Settings:"<< name << "not found." |
| 1495 | << "Set it to default value: " << value.toString(); |
| 1496 | |
| 1497 | settings->setValue(name, value); |
| 1498 | } |
| 1499 | // else option exists do nothing |
| 1500 | } |
| 1501 | } |
| 1502 | |
| 1503 | void Settings::setNewOptionMain(const QString & name, const QVariant & value, bool isForceSetOption /*= false*/) |
| 1504 | { |