Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -redb8ee3edc41b1d324cd8a53e8e27a2a58289563 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision edb8ee3edc41b1d324cd8a53e8e27a2a58289563) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -82,12 +82,27 @@ for (const auto &category : mCategorys) { QStringList groups = _Settings.groups(category); for (const auto &group : groups) { - QStringList keys = _Settings.keys (category, group); - QVariantList values = _Settings.values (category, group); + QStringList keys ; + QVariantList values ; + QString title = ""; + for (const QString &key : _Settings.keys(category, group)) { + if (Storage::Settings::isKeyTitle ( key ) ) { + title = _Settings.value(category, group, key).toString(); + } else { + const QString imagePath = QStringLiteral("%1%2").arg(_location) + .arg(_Settings.value(category, group, key).toString()); + QFileInfo fileInfo(imagePath); + values.append(fileInfo.exists() && fileInfo.isFile() ? "file:" + imagePath : ""); + keys.append(key); + } + } + if ( Storage::Settings::isCategoryInstructions( category ) ) { - TKeysList keysList = updateReplacements(group, keys ); - updateInstructions(group, keysList, values ); - updateInstructions(group ); + TKeysList keysList = updateReplacements(group, keys ); + updateInstructions(group, keysList, values, title ); + updateInstructions(group ); + + } else { //TODO: Since it is global system settings, move this to the settings controller so the C++ backend can also use it. like Date/Time formats. for (const auto &key : qAsConst(keys)) { @@ -177,10 +192,10 @@ return keysList; } -void VSettings::updateInstructions(const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues) +void VSettings::updateInstructions(const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues, const QString &vTitle) { TInstruction mInstruction; - mInstruction.location = _location; + mInstruction.title = vTitle; mInstruction.keys = vKeysList; mInstruction.values = vValues ; _instructionMap[vGroup] = mInstruction; @@ -191,12 +206,13 @@ //TODO: this function or even the structure may need to update to send less data to qml and only the updated part. TKeysList keysList = _instructionMap[vGroup].keys ; QVariantList values = _instructionMap[vGroup].values; + QString title = _instructionMap[vGroup].title; QStringList keyList; for ( const auto &keys : keysList) { keyList += keys.join(""); } QVariantMap details; - details["location"] = _location ; + details["title"] = title ; details["keys" ] = keyList ; details["values" ] = values ; _instructions[vGroup] = details ;