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>
This commit is contained in:
Friedemann Kleint 2013-07-01 16:54:34 +02:00 committed by The Qt Project
parent 032d2c9e8e
commit 6177a3026b

View File

@ -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