From 56646670e1a834739dd939e35416f065e101b428 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 23 Jan 2014 12:31:54 +0100 Subject: [PATCH] qt: Fix richtext detection hang issue on very old Qt versions Alternative implementation. Thanks to @awoland for the original. Fixes #3486. Rebased-from: 90a28680bd8b24800428b301f7bf6cbf534de2ca 0.8.x --- src/qt/guiutil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 8b9081735..ed9abcce7 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -290,11 +290,11 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) { QWidget *widget = static_cast(obj); QString tooltip = widget->toolTip(); - if(tooltip.size() > size_threshold && !tooltip.startsWith("") && !Qt::mightBeRichText(tooltip)) + if(tooltip.size() > size_threshold && !tooltip.startsWith(" to make sure Qt detects this as rich text + // Envelop with to make sure Qt detects this as rich text // Escape the current message as HTML and replace \n by
- tooltip = "" + HtmlEscape(tooltip, true); + tooltip = "" + HtmlEscape(tooltip, true) + ""; widget->setToolTip(tooltip); return true; }