summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qdialog_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-11-02 15:35:18 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-04 01:54:02 +0100
commit720093ebd915d81d9cd24bd36a9d3bacfefa059b (patch)
tree51f2ffb410444e531cbee5aaa2bd03d1ef2c78b2 /src/widgets/dialogs/qdialog_p.h
parent24971fbef0c8ad5c8a01b3eaf829f10a14899a1a (diff)
QWidgets: Delayed creation of the QPlatformDialogHelper.
- Create helper only once and ensure deletion - Move nativeDialogInUse into QDialogPrivate, ensuring the native modal helper is called from QDialog::exec() only if it is true Change-Id: Id92b278bb051ce254458f276fbf7075689a7d491 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qdialog_p.h')
-rw-r--r--src/widgets/dialogs/qdialog_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h
index 04e0d7401c..c88bda7b95 100644
--- a/src/widgets/dialogs/qdialog_p.h
+++ b/src/widgets/dialogs/qdialog_p.h
@@ -75,8 +75,10 @@ public:
resizer(0),
sizeGripEnabled(false),
#endif
- rescode(0), resetModalityTo(-1), wasModalitySet(true), eventLoop(0), platformHelper(0)
+ rescode(0), resetModalityTo(-1), wasModalitySet(true), eventLoop(0),
+ nativeDialogInUse(false), m_platformHelper(0), m_platformHelperCreated(false)
{}
+ ~QDialogPrivate() { delete m_platformHelper; }
QPointer<QPushButton> mainDef;
Qt::Orientation orientation;
@@ -104,7 +106,12 @@ public:
QPointer<QEventLoop> eventLoop;
- QPlatformDialogHelper *platformHelper;
+ bool nativeDialogInUse; // Assigned in setVisible_sys() in derived classes.
+ QPlatformDialogHelper *platformHelper() const;
+
+private:
+ mutable QPlatformDialogHelper *m_platformHelper;
+ mutable bool m_platformHelperCreated;
};
QT_END_NAMESPACE