Update guiutil.cpp #3486

pull awoland wants to merge 1 commits into bitcoin:master from awoland:patch-2 changing 1 files +2 −2
  1. awoland commented at 4:22 PM on January 4, 2014: none

    Fix old bug with tooltip.startsWith("<qt>") and HtmlEscape issue...

  2. Update guiutil.cpp
    Fix old bug with tooltip.startsWith("<qt>") and HtmlEscape issue...
    d3c6a89b54
  3. BitcoinPullTester commented at 4:35 PM on January 4, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/d3c6a89b54278fce83969f70d344d488aff188af for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. laanwj commented at 8:05 PM on January 4, 2014: member

    What issue does this fix?

  5. in src/qt/guiutil.cpp:None in d3c6a89b54
     360 | @@ -361,11 +361,11 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
     361 |      {
     362 |          QWidget *widget = static_cast<QWidget*>(obj);
     363 |          QString tooltip = widget->toolTip();
     364 | -        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
     365 | +        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
    


    laanwj commented at 9:43 AM on January 5, 2014:

    Could be abbreviated to

    if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt") && !Qt::mightBeRichText(tooltip))
    

    awoland commented at 3:32 PM on January 19, 2014:

    Indeed, it would be the most correct option.

  6. in src/qt/guiutil.cpp:None in d3c6a89b54
     365 | +        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
     366 |          {
     367 |              // Prefix <qt/> to make sure Qt detects this as rich text
     368 |              // Escape the current message as HTML and replace \n by <br>
     369 | -            tooltip = "<qt/>" + HtmlEscape(tooltip, true);
     370 | +            tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>";
    


    laanwj commented at 9:46 AM on January 5, 2014:

    IIRC <qt/> is just a minimal marker to mark a field as rich text. It is not meant as a document tag around the content. Or do you have some source saying otherwise? In any case, if this change is necessary, the closing tag should be corrected to:

    tooltip = "<qt>" + HtmlEscape(tooltip, true) + "</qt>";
    
  7. laanwj referenced this in commit 09bb0c6c2d on Jan 23, 2014
  8. laanwj referenced this in commit fbbd4b6d50 on Jan 23, 2014
  9. laanwj referenced this in commit 17b409b2e6 on Jan 23, 2014
  10. laanwj closed this on Jan 23, 2014

  11. luke-jr referenced this in commit 90a28680bd on Feb 12, 2014
  12. pooler referenced this in commit 7ac57de300 on Mar 26, 2014
  13. wtogami referenced this in commit cf46264649 on Mar 27, 2014
  14. wtogami referenced this in commit 56646670e1 on Apr 4, 2014
  15. MathyV referenced this in commit 4e4fae565d on May 9, 2014
  16. luke-jr referenced this in commit 2d07de90b4 on Dec 18, 2018
  17. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me