diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-13 13:04:20 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-13 13:04:20 -0700 |
commit | 524843af01a6983c9f6c4b48389f90fdac5d59d6 (patch) | |
tree | 592c087a52e52b16b436379af076e796d26b928f | |
parent | a3957d089af413e3dad92ff2af32eefb54eb75df (diff) | |
parent | 99fdc1d829a658597f76845094394bdfcb693b51 (diff) |
Merge pull request #1283 from laanwj/2012_05_prevent_tooltip_infiniteloop
Prevent tooltip filter from ever causing infinite loops
-rw-r--r-- | src/qt/guiutil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 23e6576772..22c0bfeebe 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -257,7 +257,7 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) { QWidget *widget = static_cast<QWidget*>(obj); QString tooltip = widget->toolTip(); - if(!Qt::mightBeRichText(tooltip) && tooltip.size() > size_threshold) + 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> |