mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #1283 from laanwj/2012_05_prevent_tooltip_infiniteloop
Prevent tooltip filter from ever causing infinite loops
This commit is contained in:
commit
524843af01
@ -257,7 +257,7 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
|
|||||||
{
|
{
|
||||||
QWidget *widget = static_cast<QWidget*>(obj);
|
QWidget *widget = static_cast<QWidget*>(obj);
|
||||||
QString tooltip = widget->toolTip();
|
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
|
// Prefix <qt/> to make sure Qt detects this as rich text
|
||||||
// Escape the current message as HTML and replace \n by <br>
|
// Escape the current message as HTML and replace \n by <br>
|
||||||
|
Loading…
Reference in New Issue
Block a user