Index: sources/storage/Settings.cpp =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r40c09957821fb3779fa06214a856c20cca110e56 --- sources/storage/Settings.cpp (.../Settings.cpp) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/storage/Settings.cpp (.../Settings.cpp) (revision 40c09957821fb3779fa06214a856c20cca110e56) @@ -66,7 +66,12 @@ QString folder = settingFolder.prepend(Storage::Settings_Path_Name); settingFiles += FileHandler::find(folder, fileFilter); } - + // DEBUG: + // settingFiles = + // { + // QFileInfo("/home/denali/Projects/application/resources/settings/Confirm/Confirm.conf"), + // QFileInfo("/home/denali/Projects/application/resources/settings/Alarms/Alarms.conf") + // }; if ( ! settingFiles.count() ) { LOG_DEBUG(QObject::tr("No setting files in the %1").arg(Storage::Settings_Path_Name)); return 2; // TODO : Define an error enum when completed @@ -147,7 +152,7 @@ else { key = line; } - _Settings.add(group, key, QVariant(value), detail.location, detail.category, enableDuplicateKey); + _Settings.add(detail.category, group, key, QVariant(value), enableDuplicateKey); // DEBUG: qDebug() << group << key << value << location << category; } } @@ -175,7 +180,7 @@ //Note: the configuration files which can be saved, are like settings and should not have duplicate values. // as an example the Alarm volume can't have two separate duplicate entry in the settings. // -------------------------------------------------------------------------------------------------------------- - _Settings.add(vGroup, vKey, vValue,"", vCategory, false); + _Settings.add(vCategory, vGroup, vKey, vValue, false); QString mPath = QFileInfo(mFileName).absolutePath(); if ( mPath.trimmed().isEmpty() ) { LOG_DEBUG("The settings path is empty."); @@ -189,8 +194,8 @@ for ( const auto &group : _Settings.groups(vCategory) ) { mContent += QString("\n[%1]\n").arg(group); - for ( const auto &key : _Settings.keys(group) ) { - mContent += QString("%1 = %2\n").arg(key).arg(_Settings.value(group, key).toString()); + for ( const auto &key : _Settings.keys(vCategory, group) ) { + mContent += QString("%1 = %2\n").arg(key).arg(_Settings.value(vCategory, group, key).toString()); } }