D14856: Search: Add workaround for missing icons in Gnome icon-theme

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Aug 15 09:54:50 BST 2018


broulik added inline comments.

INLINE COMMENTS

> katesearchbar.cpp:1332
> +        // Gnome does not seem to have all icons we want, so we use fall-back icons for those that are missing.
> +        QIcon mutateIcon = QIcon::hasThemeIcon(QStringLiteral("games-config-options")) ? QIcon::fromTheme(QStringLiteral("games-config-options")) : QIcon::fromTheme(QStringLiteral("preferences-system"));
> +        QIcon matchCaseIcon = QIcon::hasThemeIcon(QStringLiteral("format-text-superscript")) ? QIcon::fromTheme(QStringLiteral("format-text-superscript")) : QIcon::fromTheme(QStringLiteral("format-text-bold"));

`hasThemeIcon)foo)` just does `!QIcon::fromTheme(foo).isNull()` so you might as well just do the same and safe a lookup

REPOSITORY
  R39 KTextEditor

BRANCH
  master

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

To: sars, #kate, dhaumann
Cc: broulik, dhaumann, kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180815/d70d8cd5/attachment.html>


More information about the KWrite-Devel mailing list