From ef617d408b7baa09e704db40b8b157608ac9da98 Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Sun, 29 Sep 2013 09:14:40 +0200 Subject: [PATCH] Issue #913: Merge --master and --plugin switches Merged master/plugin switches in launcher. Signed-off-by: Lukasz Gromanowski --- apps/launcher/datafilespage.cpp | 9 +++++---- apps/launcher/settings/gamesettings.cpp | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index 44392794bd..43f09d1687 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -206,19 +206,20 @@ void DataFilesPage::saveSettings() mLauncherSettings.remove(QString("Profiles/") + profile + QString("/plugin")); mGameSettings.remove(QString("master")); - mGameSettings.remove(QString("plugin")); + mGameSettings.remove(QString("plugins")); + mGameSettings.remove(QString("content")); - ContentSelectorModel::ContentFileList items = mContentModel->checkedItems(); + ContentSelectorModel::ContentFileList items = mContentModel->checkedItems(); foreach(const ContentSelectorModel::EsmFile *item, items) { if (item->gameFiles().size() == 0) { mLauncherSettings.setMultiValue(QString("Profiles/") + profile + QString("/master"), item->fileName()); - mGameSettings.setMultiValue(QString("master"), item->fileName()); + mGameSettings.setMultiValue(QString("content"), item->fileName()); } else { mLauncherSettings.setMultiValue(QString("Profiles/") + profile + QString("/plugin"), item->fileName()); - mGameSettings.setMultiValue(QString("plugin"), item->fileName()); + mGameSettings.setMultiValue(QString("content"), item->fileName()); } } diff --git a/apps/launcher/settings/gamesettings.cpp b/apps/launcher/settings/gamesettings.cpp index 205879bc37..7b2356cd08 100644 --- a/apps/launcher/settings/gamesettings.cpp +++ b/apps/launcher/settings/gamesettings.cpp @@ -163,12 +163,12 @@ bool GameSettings::writeFile(QTextStream &stream) QStringList masters = mSettings.values(QString("master")); for (int i = masters.count(); i--;) { - stream << "master=" << masters.at(i) << "\n"; + stream << "content=" << masters.at(i) << "\n"; } QStringList plugins = mSettings.values(QString("plugin")); for (int i = plugins.count(); i--;) { - stream << "plugin=" << plugins.at(i) << "\n"; + stream << "content=" << plugins.at(i) << "\n"; } return true;