D19161: Use QTextFormat::TextUnderlineStyle instead of QTextFormat::FontUnderline

Ahmad Samir noreply at phabricator.kde.org
Wed Feb 20 08:19:11 GMT 2019


ahmadsamir added a comment.


  In D19161#415701 <https://phabricator.kde.org/D19161#415701>, @dhaumann wrote:
  
  > This patch looks good to me, even though I cannot reproduce the issue following the steps in https://bugs.kde.org/show_bug.cgi?id=399278.
  
  
  Another way to test, try setting the underline attribute for any item in the syntax highlighting config widget, hitting apply unsets it again.
  
  It //might// be dependent on how qt is compiled, I am using Fedora, the OP in the BR is using Ubuntu. But I didn't look into that too much, since upstream docs clearly say FontUnderline is deprecated (and it looks like it's been deprecated since qtbase was split from monolithic qt git repo).
  
  > But yes, the Qt documentation says to use TextUnderlineStyle instead of FontUnderline. The implementation of fontUnderline() indeed also first tries to use TextUnderlineStyle, see: https://code.woboq.org/qt5/qtbase/src/gui/text/qtextformat.cpp.html#_ZNK15QTextCharFormat13fontUnderlineEv
  
  Yes, I was puzzled by that too; if FontUnderline is still supported in upstream code, why doesn't it work now...
  
  > So from my side this change is OK, but probably before committing this should be tested again.
  
  [...]
  
  In D19161#415702 <https://phabricator.kde.org/D19161#415702>, @dhaumann wrote:
  
  > Btw, searching in lxr.kde.org for FontUnderline reveals some more hits: https://lxr.kde.org/ident?_i=FontUnderline&_remember=1
  
  
  OK, I'll try and get them all. :)

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D19161

To: ahmadsamir, #ktexteditor, cullmann, dhaumann
Cc: kde-frameworks-devel, kwrite-devel, gennad, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190220/edb4a6d3/attachment-0001.html>


More information about the KWrite-Devel mailing list