Skip to content

Commit

Permalink
fixing option set question flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Bollos00 committed Feb 19, 2023
1 parent 1fd608b commit fe9c638
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libreminespreferencesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ void LibreMinesPreferencesDialog::setOptionSoundVolume(const int option)

void LibreMinesPreferencesDialog::setOptionUseQuestionMark(const QString& option)
{
ui->cbProgressBarInGame->setChecked(option.compare("On", Qt::CaseInsensitive) == 0);
ui->cbUseQuestionMark->setChecked(option.compare("On", Qt::CaseInsensitive) == 0);
}

QList<int> LibreMinesPreferencesDialog::optionKeyboardControllerKeys() const
Expand Down
11 changes: 10 additions & 1 deletion src/libreminespreferencessaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ void LibreMinesPreferencesSaver::vLastSessionLoadConfigurationFile(

preferences.setOptionSoundVolume(terms.at(1).toInt());
}
else if(terms.at(0).compare("QuestionMark", Qt::CaseInsensitive) == 0)
{
if(terms.size() != 2)
continue;

preferences.setOptionUseQuestionMark(terms.at(1));
}
}
}

Expand Down Expand Up @@ -234,7 +241,9 @@ void LibreMinesPreferencesSaver::vLastSessionSaveConfigurationFile(
<< preferences.optionMinefieldGenerationAnimationString() << '\n'
<< "AskToSaveMatchScoreBehaviour" << ' '
<< (uchar)preferences.optionAskToSaveMatchScoreBehaviour() << '\n'
<< "SoundVolume" << ' ' << preferences.optionSoundVolume() << '\n';
<< "SoundVolume" << ' ' << preferences.optionSoundVolume() << '\n'
<< "QuestionMark" << ' '
<< (preferences.optionUseQuestionMark() ? "On" : "Off") << '\n';
}

QScopedPointer<QFile> fileLanguage
Expand Down

0 comments on commit fe9c638

Please sign in to comment.