diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-13 10:06:04 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-25 11:14:53 +0000 |
commit | a776a03e75ed82a66d84a7d0581824728b343c64 (patch) | |
tree | a2cd2422d5b1c6c6e1aaccd3a771f39fbccb946f /src/widgets/widgets/qcombobox_p.h | |
parent | b814d05101bbc35354388d5e46bd13df9e4a663e (diff) |
QComboBox: change showNativePopup to be non-blocking
QPlatformMenu::showPopup() is supposed to be non-blocking.
So ensure that we don't start cleaning up the menu items directly
after the call in showNativePopup, but wait until we need to reload
the items, or the combobox is destroyed.
Change-Id: Ie4c9b6425cec44861af38e517fc5ef226e0903c7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/widgets/widgets/qcombobox_p.h')
-rw-r--r-- | src/widgets/widgets/qcombobox_p.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h index 5ee7d72e8e..88b360257f 100644 --- a/src/widgets/widgets/qcombobox_p.h +++ b/src/widgets/widgets/qcombobox_p.h @@ -71,6 +71,7 @@ QT_BEGIN_NAMESPACE class QAction; +class QPlatformMenu; class QComboBoxListView : public QListView { @@ -331,7 +332,7 @@ class Q_AUTOTEST_EXPORT QComboBoxPrivate : public QWidgetPrivate Q_DECLARE_PUBLIC(QComboBox) public: QComboBoxPrivate(); - ~QComboBoxPrivate() {} + ~QComboBoxPrivate(); void init(); QComboBoxPrivateContainer* viewContainer(); void updateLineEditGeometry(); @@ -373,6 +374,7 @@ public: void updateFocusPolicy(); #ifdef Q_OS_OSX + void cleanupNativePopup(); bool showNativePopup(); #endif @@ -401,6 +403,9 @@ public: QPersistentModelIndex root; Qt::CaseSensitivity autoCompletionCaseSensitivity; int indexBeforeChange; +#ifdef Q_OS_OSX + QPlatformMenu *m_platformMenu; +#endif #ifndef QT_NO_COMPLETER QPointer<QCompleter> completer; #endif |