summaryrefslogtreecommitdiff
path: root/src/dialogs/qquickabstractcolordialog.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-02-11 21:24:31 +0100
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-02-29 12:37:55 +0000
commit22b02df3b2b898630bc043fc8a18559e8e6c73ce (patch)
tree222f868112fe4b3301016331786de26d71f49dff /src/dialogs/qquickabstractcolordialog.cpp
parentee8bfc3eaa49595bce559f89ea2cf33067a91475 (diff)
downloadqtquickcontrols-22b02df3b2b898630bc043fc8a18559e8e6c73ce.tar.gz
Port to new Q*DialogOptions API
Q*DialogOptions are no longer value types, but are held only in QSharedPointers. Consequently, all special member function have been hidden from clients and create() and clone() methods have been added. This change uses a macro defined by the QtBase change to select the API variant. This is needed for the QtBase change to integrate, and needed for as long as the QtBase change hasn't been integrated, yet. A follow-up commit will remove the scaffolding again. Change-Id: I20c1d75fcaa42323862599f2a35b815bc67b39dd Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/dialogs/qquickabstractcolordialog.cpp')
-rw-r--r--src/dialogs/qquickabstractcolordialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dialogs/qquickabstractcolordialog.cpp b/src/dialogs/qquickabstractcolordialog.cpp
index 2101fe0e..fddf1cf1 100644
--- a/src/dialogs/qquickabstractcolordialog.cpp
+++ b/src/dialogs/qquickabstractcolordialog.cpp
@@ -49,7 +49,11 @@ QT_BEGIN_NAMESPACE
QQuickAbstractColorDialog::QQuickAbstractColorDialog(QObject *parent)
: QQuickAbstractDialog(parent)
, m_dlgHelper(0)
+#ifdef QPLATFORMDIALOGHELPERS_HAS_CREATE
+ , m_options(QColorDialogOptions::create())
+#else
, m_options(QSharedPointer<QColorDialogOptions>(new QColorDialogOptions()))
+#endif
{
// On the Mac, modality doesn't work unless you call exec(). But this is a reasonable default anyway.
m_modality = Qt::NonModal;