diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-08-09 16:43:48 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-08-09 18:35:57 +0000 |
commit | 3061afd9bdb952cdfd1b011cf1c10e98bb09a8d9 (patch) | |
tree | fafe95c910a5a4dd7fa6bb8bc22433e2674f096e | |
parent | 4865136be9c61aab50c8f30942996bba58a59c3b (diff) |
QQuickPlatformColorDialog - properly initialize platform dialog helper
QCocoaColorDialogHelper in its setCurrentColor does some initialization
(using NSColorPanel) and required its 'm_options' to be set by this point.
So, first set options, then current color.
Task-number: QTBUG-69839
Change-Id: I9092c80a511890e958de5b99a9614feb134dba7e
Reviewed-by: J-P Nurmi <jpnurmi@gmail.com>
-rw-r--r-- | src/imports/platform/qquickplatformcolordialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/platform/qquickplatformcolordialog.cpp b/src/imports/platform/qquickplatformcolordialog.cpp index 9b0283d0..0b8cfd97 100644 --- a/src/imports/platform/qquickplatformcolordialog.cpp +++ b/src/imports/platform/qquickplatformcolordialog.cpp @@ -185,8 +185,8 @@ void QQuickPlatformColorDialog::onCreate(QPlatformDialogHelper *dialog) { if (QPlatformColorDialogHelper *colorDialog = qobject_cast<QPlatformColorDialogHelper *>(dialog)) { connect(colorDialog, &QPlatformColorDialogHelper::currentColorChanged, this, &QQuickPlatformColorDialog::currentColorChanged); - colorDialog->setCurrentColor(m_currentColor); colorDialog->setOptions(m_options); + colorDialog->setCurrentColor(m_currentColor); } } |