diff options
author | Liang Qi <liang.qi@qt.io> | 2017-05-31 08:13:14 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-05-31 08:13:14 +0200 |
commit | 1e472c6c1aafd893eebf29929b36b77c42c0e199 (patch) | |
tree | 5d63cff70bc21e0ead4135347cc87e65e864f824 /src/quicktemplates2/qquickcombobox.cpp | |
parent | 44dd55be23138f0a6495b08818acaaa0ff68b086 (diff) | |
parent | ef6b8d3081f0bf93d6d59e67c8e3f82c63c511c3 (diff) |
Merge remote-tracking branch 'origin/5.9.0' into 5.9
Change-Id: Iba044084bf82f6b2b8ceba4aa2a80bdcf8fc38e0
Diffstat (limited to 'src/quicktemplates2/qquickcombobox.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcombobox.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index 04ab559f..d987182c 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -672,7 +672,15 @@ QQuickComboBox::QQuickComboBox(QQuickItem *parent) QQuickComboBox::~QQuickComboBox() { - setPopup(nullptr); + Q_D(QQuickComboBox); + // Disconnect visibleChanged() to avoid a spurious highlightedIndexChanged() signal + // emission during the destruction of the (visible) popup. (QTBUG-57650) + QObjectPrivate::disconnect(d->popup, &QQuickPopup::visibleChanged, d, &QQuickComboBoxPrivate::popupVisibleChanged); + + // Delete the popup directly instead of calling setPopup(nullptr) to avoid calling + // destroyDelegate(popup) and potentially accessing a destroyed QML context. (QTBUG-50992) + delete d->popup; + d->popup = nullptr; } /*! |