forked from qt-creator/qt-creator
Add QTC_GUARD
Similar to QTC_CHECK, but has the boolean result of the condition as
value. Use it in the form
if (QTC_GUARD(condition)) { ... }
Replace some occurrences of
QTC_CHECK(condition)
if (condition) { .... }
Change-Id: I8eea02f869eb7a183dfbf4810dace48097880519
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -280,8 +280,7 @@ QMessageBox::StandardButton CheckableMessageBox::dialogButtonBoxToMessageBoxButt
|
||||
|
||||
bool askAgain(QSettings *settings, const QString &settingsSubKey)
|
||||
{
|
||||
QTC_CHECK(settings);
|
||||
if (settings) {
|
||||
if (QTC_GUARD(settings)) {
|
||||
settings->beginGroup(QLatin1String(kDoNotAskAgainKey));
|
||||
bool shouldNotAsk = settings->value(settingsSubKey, false).toBool();
|
||||
settings->endGroup();
|
||||
|
||||
Reference in New Issue
Block a user