Install Gnome-icon-theme and start kate using that theme. Open the search bar and see that the icons are displayed.
Details
- Reviewers
dhaumann broulik - Group Reviewers
Kate - Commits
- R39:e63efbdb8e4c: Search: Add workaround for missing icons in Gnome icon-theme
Diff Detail
- Repository
- R39 KTextEditor
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/search/katesearchbar.cpp | ||
---|---|---|
1332 | hasThemeIcon)foo) just does !QIcon::fromTheme(foo).isNull() so you might as well just do the same and safe a lookup |
src/search/katesearchbar.cpp | ||
---|---|---|
1332 | What would also be possible: QIcon mutateIcon = QIcon::fromTheme(QStringLiteral("games-config-options"), QIcon::fromTheme(QStringLiteral("preferences-system"))); The 2nd parameter is the fallback Icon. This would be much shorter. |
src/search/katesearchbar.cpp | ||
---|---|---|
1332 | Doesn't this evaluate the fallback always, even if not needed? |
I don't think so, because QIcon::fromTheme just creates an icon engine. The actual lookup happens when the first call to isNull or paint (etc) is made. None of which are going to be done on the fallback icon if the main icon can be found.
So this looks fine to me, unless a profiler or strace says otherwise.