aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/tooltip
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-05-09 10:57:52 +0200
committerEike Ziller <eike.ziller@qt.io>2016-05-09 09:14:10 +0000
commit766d154f2d1de7bc9a138a106a142e174ffa786b (patch)
treee8d387641e8cb64106a3e0c2958077bb2072fcd9 /src/libs/utils/tooltip
parentd8fbc76f08534c71d6a9310de54b0f2b40b52023 (diff)
Do not crash when closing editor while diagnostic tool tip is shown
Make sure that the tool tip instance is reset to nullptr even if it was closed automatically. Change-Id: I3c718634d90dddc5822a634d082c263f51901684 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/libs/utils/tooltip')
-rw-r--r--src/libs/utils/tooltip/tooltip.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/utils/tooltip/tooltip.h b/src/libs/utils/tooltip/tooltip.h
index d6ad642ece2..2ddd94e2505 100644
--- a/src/libs/utils/tooltip/tooltip.h
+++ b/src/libs/utils/tooltip/tooltip.h
@@ -30,6 +30,7 @@
#include <QSharedPointer>
#include <QObject>
+#include <QPointer>
#include <QTimer>
#include <QRect>
@@ -107,7 +108,7 @@ private:
void showTip();
void hideTipWithDelay();
- Internal::QTipLabel *m_tip;
+ QPointer<Internal::QTipLabel> m_tip;
QWidget *m_widget;
QRect m_rect;
QTimer m_showTimer;