D20760: Okular Annotation: add support for line ending style for Straight Line tool

Tobias Deiminger noreply at phabricator.kde.org
Sat Apr 27 10:17:13 BST 2019


tobiasdeiminger added a comment.


  In D20760#456328 <https://phabricator.kde.org/D20760#456328>, @davidhurka wrote:
  
  > Isn’t there a coding convention against non-ascii symbols in source code?
  
  
  There are Qt source code conventions <https://wiki.qt.io/Coding_Conventions#Conventions_in_Qt_source_code>. Don't know if Okular policy exists for which conventions to follow, but I agree it makes sense to avoid non-ascii (don't rely on source code input encoding). QString::fromUtf8 <https://doc.qt.io/qt-5/qstring.html#fromUtf8> combined with a u8 string literal <https://en.cppreference.com/w/cpp/language/string_literal> should work, but haven't tested. Other ideas?
  
  > And I think real icons (like svg) would be better. What if someone changes the system font? At least I see some boring rectangles in the source code.
  
  If we want to avoid the unicode approach completely, I'd advocate to implement drawing the lines by code, i.e. QPainter::drawLine <https://doc.qt.io/qt-5/qpainter.html#drawLine> and friends. Then reuse the same code to draw icons. So we gain non-PDF support while we are at it, and I guess it's not much more work than crafting the SVG.

REPOSITORY
  R223 Okular

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

To: knambiar, #okular, #vdg
Cc: davidhurka, tobiasdeiminger, ngraham, okular-devel, joaonetto, tfella, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190427/1e41880d/attachment.html>


More information about the Okular-devel mailing list