aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-20 14:55:32 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-21 10:42:38 +0000
commitf19e2d5fa656815fe27d41d191a6f5dc95ed1047 (patch)
tree329f676234c4ff9db2660b6279744e6e662a7b54 /src
parentd7d0592322c76957c1695bce24344fde6f4c1367 (diff)
QQuickComboBox: don't emit highlightedIndexChanged() during destruction
If QQuickComboBox was destroyed while its popup was open, it emitted highlightedIndexChanged() during the destruction due to the popup's visibility change. Use setPopup(nullptr) to destroy the popup in a controlled manner, that is, disconnecting the relevant signals first. This way deleting the popup doesn't have weird side-effects during the destruction of QQuickComboBox. Task-number: QTBUG-57650 Change-Id: I1c55707be68a24e115276ffb6dfa1c89051a45ea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index 29fa5e55..786db55b 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -633,9 +633,7 @@ QQuickComboBox::QQuickComboBox(QQuickItem *parent)
QQuickComboBox::~QQuickComboBox()
{
- Q_D(QQuickComboBox);
- delete d->popup;
- d->popup = nullptr;
+ setPopup(nullptr);
}
/*!