Remember user choice on questions
This commit is contained in:
parent
ec4828d4c4
commit
8a900600f5
@ -74,7 +74,7 @@ bool InformationBox::AskQuestion(QString title, QString question, bool defaultAn
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// don't show this question anymore
|
// don't show this question anymore
|
||||||
return defaultAnswer;
|
return s.value(hashToSettingsKey(hash)).toBool();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,8 +105,13 @@ InformationBox::~InformationBox()
|
|||||||
{
|
{
|
||||||
auto cb = checkBox();
|
auto cb = checkBox();
|
||||||
if(cb->isChecked()) {
|
if(cb->isChecked()) {
|
||||||
|
auto value = true;
|
||||||
|
auto clicked = clickedButton();
|
||||||
|
if(clicked && QMessageBox::standardButton(clicked) == StandardButton::No) {
|
||||||
|
value = false;
|
||||||
|
}
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.setValue(hashToSettingsKey(hash), true);
|
s.setValue(hashToSettingsKey(hash), value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user