diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-07-01 16:54:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-02 11:05:18 +0200 |
commit | 6177a3026b3392de43a19e5be213baf7b22c9a3c (patch) | |
tree | c52338d3938c5efc4c893e10846cd167551c9bdc /src/plugins/platforms/windows | |
parent | 032d2c9e8eaa98ba191d5f90fa7509ebdf846ed1 (diff) |
Windows: Fix the code of the native color dialog.
Note: The code is currently #ifdefed out, it is just there
to be able to compare QColorDialog to the native dialog.
Task-number: QTBUG-32054
Change-Id: I042f6701d1a076480cae56c53ae2d3ad303d37d1
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 12dd00f104..15a00eb5c6 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -2023,7 +2023,7 @@ void QWindowsNativeColorDialog::exec(HWND owner) qCustomColors[c] = COLORREFToQColor(m_customColors[c]).rgb(); emit accepted(); if (QWindowsContext::verboseDialogs) - qDebug() << '<' << __FUNCTION__ << m_color; + qDebug() << '<' << __FUNCTION__ << *m_color; } else { emit rejected(); } @@ -2044,7 +2044,7 @@ void QWindowsNativeColorDialog::exec(HWND owner) class QWindowsColorDialogHelper : public QWindowsDialogHelperBase<QPlatformColorDialogHelper> { public: - QWindowsColorDialogHelper() {} + QWindowsColorDialogHelper() : m_currentColor(new QColor) {} virtual bool supportsNonModalDialog() { return false; } @@ -2064,6 +2064,8 @@ QWindowsNativeDialogBase *QWindowsColorDialogHelper::createNativeDialog() { QWindowsNativeColorDialog *nativeDialog = new QWindowsNativeColorDialog(m_currentColor); nativeDialog->setWindowTitle(options()->windowTitle()); + connect(nativeDialog, SIGNAL(accepted()), this, SIGNAL(accept())); + connect(nativeDialog, SIGNAL(rejected()), this, SIGNAL(reject())); return nativeDialog; } #endif // USE_NATIVE_COLOR_DIALOG |