summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-05 09:12:59 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-05 09:15:12 (GMT)
commit80e47c92e0b4f506b2b57d0e58022903dc62ba3d (patch)
tree27e205c620d64e09f3866279c1af3d36b0697810 /src/gui/kernel
parent10dba674d366260589f3b742e5b1b87ce9ddd47c (diff)
downloadQt-80e47c92e0b4f506b2b57d0e58022903dc62ba3d.zip
Qt-80e47c92e0b4f506b2b57d0e58022903dc62ba3d.tar.gz
Qt-80e47c92e0b4f506b2b57d0e58022903dc62ba3d.tar.bz2
Tooltip: reusing tooltips sometimes goes wrong
We reuse tooltip whenever we can. But we forget to check if the format of the text changes inbetween (from html to plain). This causes the word wrap to fail sometimes. This change will fix that. Rev-By:MortenS
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qtooltip.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qtooltip.cpp b/src/gui/kernel/qtooltip.cpp
index 2d0d209..4261808 100644
--- a/src/gui/kernel/qtooltip.cpp
+++ b/src/gui/kernel/qtooltip.cpp
@@ -183,7 +183,6 @@ QTipLabel::QTipLabel(const QString &text, QWidget *w)
setFrameStyle(QFrame::NoFrame);
setAlignment(Qt::AlignLeft);
setIndent(1);
- setWordWrap(Qt::mightBeRichText(text));
qApp->installEventFilter(this);
setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0);
setMouseTracking(true);
@@ -208,6 +207,7 @@ void QTipLabel::reuseTip(const QString &text)
}
#endif
+ setWordWrap(Qt::mightBeRichText(text));
setText(text);
QFontMetrics fm(font());
QSize extra(1, 0);