QErrorMessage: Reset 'again' check box between each error message
The choice of whether to show a message again is per message, so when showing a new message we need to reset the check box back to its default checked state, otherwise the user might mistakenly dismiss more than the indented message. [ChangeLog][Widgets] QErrorMessage will now reset the check box for showing a message again for each new message shown, as each individual message has its own suppression state. Change-Id: I86d4bb5eabdb5b7a478c03516108a5edf87fcbe3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f2fc2013defc2f346fa1936dcf357d34bae3dbba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
cb14d0ec7f
commit
dcf7247e05
@ -358,6 +358,7 @@ bool QErrorMessagePrivate::nextPending()
|
|||||||
#endif
|
#endif
|
||||||
currentMessage = std::move(message);
|
currentMessage = std::move(message);
|
||||||
currentType = std::move(type);
|
currentType = std::move(type);
|
||||||
|
again->setChecked(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,8 +70,7 @@ void tst_QErrorMessage::dontShowAgain()
|
|||||||
QVERIFY(errorMessageDialog.isVisible());
|
QVERIFY(errorMessageDialog.isVisible());
|
||||||
checkBox = errorMessageDialog.findChild<QCheckBox*>();
|
checkBox = errorMessageDialog.findChild<QCheckBox*>();
|
||||||
QVERIFY(checkBox);
|
QVERIFY(checkBox);
|
||||||
QVERIFY(!checkBox->isChecked());
|
QVERIFY(checkBox->isChecked());
|
||||||
checkBox->setChecked(true);
|
|
||||||
errorMessageDialog.close();
|
errorMessageDialog.close();
|
||||||
|
|
||||||
errorMessageDialog.showMessage(htmlString);
|
errorMessageDialog.showMessage(htmlString);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user