D18997: Add functions returning all definitions for a mimetype or file name

2019-02-21 Thread Christoph Cullmann
cullmann closed this revision.
cullmann added a comment.


  Ok ;=)

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-21 Thread David Schulz
davschul added a comment.


  Created https://phabricator.kde.org/D19200
  That should implement all the latest suggestions/comments

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-17 Thread Christoph Cullmann
cullmann reopened this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  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.

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-16 Thread Dominik Haumann
dhaumann added a comment.


  Ping?

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-14 Thread Dominik Haumann
dhaumann added inline comments.

INLINE COMMENTS

> repository.h:176
> + */
> +QVector definitionsForFileName(const QString &fileName) 
> const;
> +

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?

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-14 Thread Christoph Cullmann
cullmann added a comment.


  Thanks.
  
  Nice that we get the patches, then all can benefit from the improvements.

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, vkrause, sars, dhaumann


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-14 Thread David Schulz
davschul added a comment.


  Nice respond times here, and thanks for the reviews :)

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, vkrause, sars, dhaumann


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-14 Thread Christoph Cullmann
This revision was automatically updated to reflect the committed changes.
Closed by commit R216:0e94e0006005: Add functions returning all definitions for 
a mimetype or file name (authored by davschul, committed by cullmann).

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18997?vs=51649&id=51651

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

AFFECTED FILES
  src/lib/repository.cpp
  src/lib/repository.h

To: davschul, vkrause, cullmann
Cc: cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, vkrause, sars, dhaumann


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-14 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  Thanks => will push that.

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

To: davschul, vkrause, cullmann
Cc: cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, vkrause, sars, dhaumann


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-14 Thread David Schulz
davschul updated this revision to Diff 51649.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18997?vs=51645&id=51649

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

AFFECTED FILES
  src/lib/repository.cpp
  src/lib/repository.h

To: davschul, vkrause, cullmann
Cc: cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, vkrause, sars, dhaumann


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-13 Thread Christoph Cullmann
cullmann requested changes to this revision.
cullmann added a comment.
This revision now requires changes to proceed.


  Makes sense.
  
  Could you add a @since 5.56 to the doxygen?
  
  Otherwise this seems fine.

REPOSITORY
  R216 Syntax Highlighting

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

To: davschul, vkrause, cullmann
Cc: cullmann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, vkrause, sars, dhaumann


D18997: Add functions returning all definitions for a mimetype or file name

2019-02-13 Thread David Schulz
davschul created this revision.
davschul added a reviewer: vkrause.
davschul added a project: Framework: Syntax Highlighting.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
davschul requested review of this revision.

REVISION SUMMARY
  This can be used to show UI controls to let the user decide which definition 
should be used
  for a specific file.

REPOSITORY
  R216 Syntax Highlighting

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

AFFECTED FILES
  src/lib/repository.cpp
  src/lib/repository.h

To: davschul, vkrause
Cc: kwrite-devel, kde-frameworks-devel, gennad, bmortimer, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars, dhaumann