Issue #913: Merge --master and --plugin switches

Merged master/plugin switches in launcher.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
pull/51/head
Lukasz Gromanowski 11 years ago
parent 9c2145eda1
commit ef617d408b

@ -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());
}
}

@ -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;

Loading…
Cancel
Save