This can be used to show UI controls to let the user decide which definition should be used
for a specific file.
Details
Details
Diff Detail
Diff Detail
- Repository
- R216 Syntax Highlighting
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/lib/repository.h | ||
---|---|---|
176 | As I understand, this currently is unsorted. Wouldn't it make sense to sort the returned vector by priority? This information is also missing currently in the API documentation: I had to read the code to understand whether the Definitions in the QVector are sorted or not. Same for definitionsForMimeType(). Any comments? |
Comment Actions
I would propose:
Use the m_sortedDefs as base for the searching.
Return the vector after the bestCandidate did the sort.
That would yield in my eyes the most useful sorting: all things with the same priority that match have the original sort as in definitions() and you get best candidates first.
Comment Actions
Created https://phabricator.kde.org/D19200
That should implement all the latest suggestions/comments