Instead of creating N empty QIcons, use just one QIcon
that internally is implicitly shared, see:
https://doc.qt.io/qt-5/implicit-sharing.html
Details
Details
make
Diff Detail
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.
Comment Actions
In the function KateModeMenuList::updateSelectedItem() an empty QIcon is also created when selecting an item. It would be better to put emptyIcon as an attribute of the class and use it every time.
I will do it in another commit, I have seen others bugs in the mode menu, apparently they appeared when I changed from QListWidget to QListView.