Update guiutil.cpp
authorawoland <awoland@me.com>
Sun, 5 Jan 2014 09:57:35 +0000 (12:57 +0300)
committerawoland <awoland@me.com>
Sun, 5 Jan 2014 09:57:35 +0000 (12:57 +0300)
Fix old bug in GUI with HtmlEscape(tooltip ...

src/qt/guiutil.cpp

index f6ad8ed..ab20bca 100644 (file)
@@ -258,11 +258,11 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
     {
         QWidget *widget = static_cast<QWidget*>(obj);
         QString tooltip = widget->toolTip();
-        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
+        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !Qt::mightBeRichText(tooltip))
         {
             // Prefix <qt/> to make sure Qt detects this as rich text
             // Escape the current message as HTML and replace \n by <br>
-            tooltip = "<qt/>" + HtmlEscape(tooltip, true);
+            tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>";
             widget->setToolTip(tooltip);
             return true;
         }