D27533: [WIP] Add MarkInterfaceV2, to s/QPixmap/QIcon/g for symbols of marks

Dominik Haumann noreply at phabricator.kde.org
Sat Feb 22 10:41:05 GMT 2020


dhaumann added a comment.


  Ok, then I am fine with this. Maybe add a KF6 task to the KF6 board?

INLINE COMMENTS

> kossebau wrote in katedocument.h:86
> See the warning in the API docs, nobody should rely on this private API, so the BIC here is okay.
> The class is exported for the unit tests basically.
> Also is the header file not installed, so not really available outside.

Friedrich is correct. We have no issue here.

> katedocument.h:586
>      QHash<int, KTextEditor::Mark *> m_marks;
> -    QHash<int, QPixmap> m_markPixmaps;
> +    QHash<int, QVariant> m_markIcons; // QPixmap or QIcon, KF6: remove QPixmap support
>      QHash<int, QString> m_markDescriptions;

Better turn " Remove pixmap support" into use QIcon only.

> katesearchbar.cpp:906
>      if (!m_highlightRanges.empty()) {
> -        KTextEditor::MarkInterface *iface = qobject_cast<KTextEditor::MarkInterface *>(m_view->document());
> +        KTextEditor::MarkInterfaceV2 *iface = qobject_cast<KTextEditor::MarkInterfaceV2 *>(m_view->document());
>          if (iface) {

maybe use `auto` here.

> kossebau wrote in kateviewhelpers.cpp:1963
> Possibly `QIcon::paint()` might be also working here as wanted? Needs someone with HiDPI to check if all things behave as wanted. The old code with all the `devicePixelRatioF()` made me change not too much here.

I believe you can check yourself with proper environment variables, or?

REPOSITORY
  R39 KTextEditor

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

To: kossebau, #kate, #kdevelop
Cc: anthonyfieroni, dhaumann, kwrite-devel, kde-frameworks-devel, rrosch, LeGast00n, cblack, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200222/6156f184/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list