Working on the Settings tab: start the importer/wizard

This commit is contained in:
pvdk 2014-04-16 16:54:55 +02:00
parent cfe66abbc5
commit 21c406316f
12 changed files with 342 additions and 109 deletions

View file

@ -41,14 +41,20 @@ QStringList Config::LauncherSettings::subKeys(const QString &key)
QMap<QString, QString> settings = SettingsBase::getSettings();
QStringList keys = settings.uniqueKeys();
qDebug() << keys;
QRegExp keyRe("(.+)/");
QStringList result;
foreach (const QString &currentKey, keys) {
if (keyRe.indexIn(currentKey) != -1) {
if (keyRe.indexIn(currentKey) != -1)
{
QString prefixedKey = keyRe.cap(1);
if(prefixedKey.startsWith(key)) {
if(prefixedKey.startsWith(key))
{
QString subKey = prefixedKey.remove(key);
if (!subKey.isEmpty())
result.append(subKey);