mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
Modifications to the writeConfig function
This commit is contained in:
parent
8c4fad1f59
commit
a321685e7a
1 changed files with 7 additions and 5 deletions
|
@ -342,15 +342,17 @@ void DataFilesPage::writeConfig()
|
||||||
settings.beginGroup(mProfileComboBox->currentText());
|
settings.beginGroup(mProfileComboBox->currentText());
|
||||||
|
|
||||||
// First write all the masters to the config
|
// First write all the masters to the config
|
||||||
for (int i = 0; i < mMastersWidget->rowCount(); ++i) {
|
for (int r = 0; r < mMastersWidget->rowCount(); ++r) {
|
||||||
const QTableWidgetItem *item = mMastersWidget->item(i, 0);
|
const QTableWidgetItem *item = mMastersWidget->item(r, 0);
|
||||||
settings.setValue(QString("Master"), item->data(Qt::DisplayRole).toString());
|
settings.setValue(QString("Master%1").arg(r), item->data(Qt::DisplayRole).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now write all checked plugins
|
// Now write all checked plugins
|
||||||
foreach (const QString ¤tPlugin, checkedItems())
|
const QStringList checkedPlugins = checkedItems();
|
||||||
|
|
||||||
|
for (int i = 0; i < checkedPlugins.size(); ++i)
|
||||||
{
|
{
|
||||||
settings.setValue(QString("Plugin"), currentPlugin);
|
settings.setValue(QString("Plugin%1").arg(i), checkedPlugins.at(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
Loading…
Reference in a new issue