Skip to content

Commit cd3bd74

Browse files
committed
Update guiutil.cpp
Fix old bug in GUI with HtmlEscape(tooltip ...
1 parent 24c1d28 commit cd3bd74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/guiutil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
258258
{
259259
QWidget *widget = static_cast<QWidget*>(obj);
260260
QString tooltip = widget->toolTip();
261-
if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
261+
if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !Qt::mightBeRichText(tooltip))
262262
{
263263
// Prefix <qt/> to make sure Qt detects this as rich text
264264
// Escape the current message as HTML and replace \n by <br>
265-
tooltip = "<qt/>" + HtmlEscape(tooltip, true);
265+
tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>";
266266
widget->setToolTip(tooltip);
267267
return true;
268268
}

0 commit comments

Comments
 (0)