KateModeMenuList: move to QListView
ClosedPublic

Authored by nibags on Jun 10 2019, 8:03 AM.

Details

Summary

The new Mode menu introduced in D20958 is updated, removing the use of QListWidget.

This replaces:
QListWidget with QListView + QStandardItemModel
and KListWidgetSearchLine with QLineEdit

In addition, some changes are made:

  • Decrease delay in displaying search results, after typing. The search clearing is done without delays.
  • Add ToolTip in the search bar, with a brief description.

I also made small improvements to the code. From the user's point of view, this patch is almost imperceptible.

Diff Detail

Repository
R39 KTextEditor
Branch
move-qlistview
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12706
Build 12724: arc lint + arc unit
nibags created this revision.Jun 10 2019, 8:03 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJun 10 2019, 8:03 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
nibags requested review of this revision.Jun 10 2019, 8:03 AM
nibags edited the summary of this revision. (Show Details)Jun 10 2019, 8:04 AM
nibags updated this revision to Diff 59577.Jun 11 2019, 6:40 AM
  • Correct code style

Remove this-> and return at the end of void functions.

ngraham added inline comments.
src/mode/katemodemenulist.cpp
85 ↗(On Diff #59577)

Recommend a slight change: "Search for syntax highlighting modes by language name or file extension (for example, C++ or .cpp)"

nibags updated this revision to Diff 59631.Jun 12 2019, 7:03 AM
  • Update tooltip of search bar

+1, thanks!

cullmann accepted this revision.Jun 12 2019, 6:17 PM

I would say: go for it.
And thanks for taking care!

This revision is now accepted and ready to land.Jun 12 2019, 6:17 PM
nibags closed this revision.Jun 15 2019, 9:20 AM