D14730: Sort returned formats in Definition::formats() by id

2018-08-10 Thread Dominik Haumann
This revision was automatically updated to reflect the committed changes.
Closed by commit R216:e23573cc90f3: Sort returned formats in 
Definition::formats() by id (authored by dhaumann).

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14730?vs=39411=39416

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

AFFECTED FILES
  autotests/syntaxrepository_test.cpp
  src/lib/definition.cpp
  src/lib/definition.h

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


D14730: Sort returned formats in Definition::formats() by id

2018-08-10 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  I think any sorting is better than the current "random" hash order.

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  sort-formats (branched from master)

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

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


D14730: Sort returned formats in Definition::formats() by id

2018-08-10 Thread Dominik Haumann
dhaumann updated this revision to Diff 39411.
dhaumann added a comment.


  - Update comment

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14730?vs=39408=39411

BRANCH
  sort-formats (branched from master)

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

AFFECTED FILES
  autotests/syntaxrepository_test.cpp
  src/lib/definition.cpp
  src/lib/definition.h

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


D14730: Sort returned formats in Definition::formats() by id

2018-08-10 Thread Dominik Haumann
dhaumann created this revision.
dhaumann added reviewers: vkrause, cullmann.
Restricted Application added projects: Kate, Frameworks.
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.
dhaumann requested review of this revision.

REVISION SUMMARY
  Sorting the formats() by id results in the same order as the
  itemDatas are defined in the xml file. This is required for
  several reasons:
  
  - KTextEditor currently uses the first format if no format was explicitly 
specified (which typically is "Normal Text")
  - Fonts & Colors will list the itemDatas in correct order
  - Printing the syntax guide is sorted correctly as well

TEST PLAN
  make && make test

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  sort-formats (branched from master)

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

AFFECTED FILES
  autotests/syntaxrepository_test.cpp
  src/lib/definition.cpp

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