diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/widgets/dialogs/qdialog_p.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/widgets/dialogs/qdialog_p.h')
-rw-r--r-- | src/widgets/dialogs/qdialog_p.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index 99fff08e65..74f775a0bd 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -75,19 +75,19 @@ public: QDialogPrivate() : #if QT_CONFIG(pushbutton) - mainDef(0), + mainDef(nullptr), #endif - orientation(Qt::Horizontal),extension(0), doShowExtension(false), + orientation(Qt::Horizontal),extension(nullptr), doShowExtension(false), #if QT_CONFIG(sizegrip) - resizer(0), + resizer(nullptr), sizeGripEnabled(false), #endif - rescode(0), resetModalityTo(-1), wasModalitySet(true), eventLoop(0), - nativeDialogInUse(false), m_platformHelper(0), m_platformHelperCreated(false) + rescode(0), resetModalityTo(-1), wasModalitySet(true), eventLoop(nullptr), + nativeDialogInUse(false), m_platformHelper(nullptr), m_platformHelperCreated(false) {} ~QDialogPrivate(); - QWindow *parentWindow() const; + QWindow *transientParentWindow() const; bool setNativeDialogVisible(bool visible); QVariant styleHint(QPlatformDialogHelper::StyleHint hint) const; void deletePlatformHelper(); @@ -122,6 +122,9 @@ public: QPlatformDialogHelper *platformHelper() const; virtual bool canBeNativeDialog() const; + void hide(int resultCode); + void finalize(int resultCode, int dialogCode); + private: virtual void initHelper(QPlatformDialogHelper *) {} virtual void helperPrepareShow(QPlatformDialogHelper *) {} @@ -137,14 +140,14 @@ class QAutoPointer { struct internal { void func() {} }; typedef void (internal::*RestrictedBool)(); public: - explicit QAutoPointer(T *t) Q_DECL_NOTHROW : o(t) {} + explicit QAutoPointer(T *t) noexcept : o(t) {} ~QAutoPointer() { delete o; } - T *operator->() const Q_DECL_NOTHROW { return get(); } - T *get() const Q_DECL_NOTHROW { return o; } + T *operator->() const noexcept { return get(); } + T *get() const noexcept { return o; } T &operator*() const { return *get(); } - operator RestrictedBool() const Q_DECL_NOTHROW { return o ? &internal::func : nullptr; } - bool operator!() const Q_DECL_NOTHROW { return !o; } + operator RestrictedBool() const noexcept { return o ? &internal::func : nullptr; } + bool operator!() const noexcept { return !o; } private: Q_DISABLE_COPY(QAutoPointer); }; |