diff options
author | Michael Andreen <harv@ruin.nu> | 2013-07-30 23:36:20 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-08-05 06:55:18 +0200 |
commit | 069f588d9dfc6ae6b93d19364846e8a6ed4af6a2 (patch) | |
tree | 671a2d252229fedc00524bd5f6e2a2956447a7ee /qt-ui/profilegraphics.h | |
parent | 396b2d10317e49de029def1f4061e03e383c9040 (diff) | |
download | subsurface-069f588d9dfc6ae6b93d19364846e8a6ed4af6a2.tar.gz |
Support more than one event of the same type in Qt tooltip.
Since the tooltip text was used as key in the map, two events of the
same type, close to eachother, would cause one of them to not be
removed.
Since ToolTip::removeToolTip() isn't used, we don't need a QMap and can
use a QList instead, so all tooltips are properly cleared.
Signed-off-by: Michael Andreen <harv@ruin.nu>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r-- | qt-ui/profilegraphics.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h index f030ff1a8..0bcbf7529 100644 --- a/qt-ui/profilegraphics.h +++ b/qt-ui/profilegraphics.h @@ -35,7 +35,6 @@ public: void expand(); void clear(); void addToolTip(const QString& toolTip, const QIcon& icon = QIcon()); - void removeToolTip(const QString& toolTip); void refresh(struct graphics_context* gc, QPointF pos); bool isExpanded(); void persistPos(); @@ -48,7 +47,7 @@ public slots: private: typedef QPair<QGraphicsPixmapItem*, QGraphicsSimpleTextItem*> ToolTip; - QMap<QString, ToolTip > toolTips; + QList<ToolTip> toolTips; QGraphicsPathItem *background; QGraphicsLineItem *separator; QGraphicsSimpleTextItem *title; |