diff options
author | Eike Ziller <eike.ziller@qt.io> | 2016-05-09 10:57:52 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2016-05-09 09:14:10 +0000 |
commit | 766d154f2d1de7bc9a138a106a142e174ffa786b (patch) | |
tree | e8d387641e8cb64106a3e0c2958077bb2072fcd9 | |
parent | d8fbc76f08534c71d6a9310de54b0f2b40b52023 (diff) | |
download | qt-creator-766d154f2d1de7bc9a138a106a142e174ffa786b.tar.gz |
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>
-rw-r--r-- | src/libs/utils/tooltip/tooltip.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/utils/tooltip/tooltip.h b/src/libs/utils/tooltip/tooltip.h index d6ad642ece..2ddd94e250 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; |