summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfontdialog.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-08-26 19:29:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-29 12:44:24 +0200
commitdf7944e7d7dd8b2bbccbd639eff0ab09745d6cc3 (patch)
treec59f5ed9f7f74ad6a2bca10225af56e98bf00b14 /src/widgets/dialogs/qfontdialog.cpp
parente4b2a0b4bab2a17a65fedafe9bae50af1fe019f6 (diff)
Cocoa: Fix QFontDialog, QColorDialog auto-tests
The new Cocoa event dispatcher made apparent some deficiencies in the way the dialog helpers were being hidden. In particular, we would not stop a dialog helper's modal loop when closing the dialog, resulting in the auto-tests hanging. Also, since the QApplication event loop is runnig with [NSApp run] in the stack, the previous workarounds are no longer needed. Task-number: QTBUG-24321 Change-Id: Ifba713c286638d78a699c319a15683d09714f06f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/widgets/dialogs/qfontdialog.cpp')
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index b989ea7c86..28afd91a09 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -983,14 +983,9 @@ void QFontDialog::setVisible(bool visible)
Q_D(QFontDialog);
if (d->canBeNativeDialog())
d->setNativeDialogVisible(visible);
- if (d->nativeDialogInUse) {
- // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
- // updates the state correctly, but skips showing the non-native version:
- setAttribute(Qt::WA_DontShowOnScreen, true);
- } else {
- d->nativeDialogInUse = false;
- setAttribute(Qt::WA_DontShowOnScreen, false);
- }
+ // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
+ // updates the state correctly, but skips showing the non-native version:
+ setAttribute(Qt::WA_DontShowOnScreen, d->nativeDialogInUse);
QDialog::setVisible(visible);
}