summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qcolordialog.cpp
diff options
context:
space:
mode:
authorChristoph Schleifenbaum <christoph.schleifenbaum@kdab.com>2012-04-10 17:17:41 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-27 05:51:14 +0200
commit1c9a4093a5402b4e7a8ebe1aea819d98af833e40 (patch)
tree71823d22c018ebfc675ff9b1158d37f99ba78768 /src/widgets/dialogs/qcolordialog.cpp
parent551fd20c19a7c19dd4d0449d64fc7e0a05553f57 (diff)
Respect the DontUseNativeDialog flag.
QFontDialog and QColorDialog were ignoring the DontUseNativeDialog. This lead to a native (Cocoa) dialog created all the time. Fix the testcase for QFontDialog. It needs the DontUseNativeDialog flag set. Task-number: QTBUG-24321 Change-Id: I159c1ad057bac38226f1e01a56b15f142650bfd8 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 606b9b00f7..d7a8f5dc21 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1247,7 +1247,7 @@ inline bool QColorDialogPrivate::isAlphaVisible() const { return cs->isAlphaVisi
QColor QColorDialogPrivate::currentQColor() const
{
- if (nativeDialogInUse)
+ if (!options->testOption(QColorDialogOptions::DontUseNativeDialog) && nativeDialogInUse)
return platformColorDialogHelper()->currentColor_sys();
return cs->currentQColor();
}
@@ -1706,8 +1706,7 @@ void QColorDialog::setCurrentColor(const QColor &color)
d->selectColor(color);
d->setCurrentAlpha(color.alpha());
- // ### fixme: Call helper
- if (d->nativeDialogInUse)
+ if (!testOption(QColorDialog::DontUseNativeDialog) && d->nativeDialogInUse)
d->platformColorDialogHelper()->setCurrentColor_sys(color);
}