summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qtooltip.cpp
diff options
context:
space:
mode:
authorTrond Kjernaasen <trond@trolltech.com>2009-09-17 13:07:03 (GMT)
committerTrond Kjernaasen <trond@trolltech.com>2009-09-17 13:11:00 (GMT)
commitdeb322f3f358b0e596720f85361a0e7077137530 (patch)
treeb80f96f7172d0dc231b6f65be40cf3e51c0fbe54 /src/gui/kernel/qtooltip.cpp
parentd267c0946b65e0c93cb97ebb3dea1035ff390280 (diff)
downloadQt-deb322f3f358b0e596720f85361a0e7077137530.zip
Qt-deb322f3f358b0e596720f85361a0e7077137530.tar.gz
Qt-deb322f3f358b0e596720f85361a0e7077137530.tar.bz2
Fixed a bug in QToolTip when internal tool tips where reused.
If a tool tip is to be reused, it *has* to be visible otherwise it *may* get destroyed by the expiration timer before the timer is reset. The tst_qtooltip::setPalette() test triggered this obscure bug under Windows. Reviewed-by: Kim
Diffstat (limited to 'src/gui/kernel/qtooltip.cpp')
-rw-r--r--src/gui/kernel/qtooltip.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qtooltip.cpp b/src/gui/kernel/qtooltip.cpp
index a480195..2d0d209 100644
--- a/src/gui/kernel/qtooltip.cpp
+++ b/src/gui/kernel/qtooltip.cpp
@@ -290,8 +290,8 @@ void QTipLabel::timerEvent(QTimerEvent *e)
// Fade out tip on mac (makes it invisible).
// The tip will not be deleted until a new tip is shown.
- // DRSWAT - Cocoa
- macWindowFade(qt_mac_window_for(this));
+ // DRSWAT - Cocoa
+ macWindowFade(qt_mac_window_for(this));
QTipLabel::instance->fadingOut = true; // will never be false again.
}
else
@@ -431,7 +431,7 @@ bool QTipLabel::tipChanged(const QPoint &pos, const QString &text, QObject *o)
void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect)
{
- if (QTipLabel::instance){ // a tip does already exist
+ if (QTipLabel::instance && QTipLabel::instance->isVisible()){ // a tip does already exist
if (text.isEmpty()){ // empty text means hide current tip
QTipLabel::instance->hideTip();
return;