QErrorMessage: streamline conditionals in done()
...to avoid checking the same conditions a second time. Saves 32B in text size on my machine, too. Change-Id: I0368408b9f5feb02e811dc15ade79d9796031896 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
parent
bb7b20b446
commit
b6b17c2040
@ -269,11 +269,13 @@ QErrorMessage::~QErrorMessage()
|
|||||||
void QErrorMessage::done(int a)
|
void QErrorMessage::done(int a)
|
||||||
{
|
{
|
||||||
Q_D(QErrorMessage);
|
Q_D(QErrorMessage);
|
||||||
if (!d->again->isChecked() && !d->currentMessage.isEmpty() && d->currentType.isEmpty()) {
|
if (!d->again->isChecked()) {
|
||||||
d->doNotShow.insert(d->currentMessage);
|
if (d->currentType.isEmpty()) {
|
||||||
}
|
if (!d->currentMessage.isEmpty())
|
||||||
if (!d->again->isChecked() && !d->currentType.isEmpty()) {
|
d->doNotShow.insert(d->currentMessage);
|
||||||
d->doNotShowType.insert(d->currentType);
|
} else {
|
||||||
|
d->doNotShowType.insert(d->currentType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
d->currentMessage.clear();
|
d->currentMessage.clear();
|
||||||
d->currentType.clear();
|
d->currentType.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user