D14451: Add Repo::formatFromId(), Definition::formatFromId() and ::formats()

Dominik Haumann noreply at phabricator.kde.org
Sun Jul 29 10:42:50 BST 2018


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

REVISION SUMMARY
  With Repository::formatFromId() it is now possible to only save the
  format ids when highlighting a line, which is a very efficient way
  to store highlighting information per text line and the way it is
  done in KTextEditor.
  
  Definition::formats() can be used to list all Formats from one
  specific Definition, e.g. for printing a syntax guide.
  
  Defintion:formatFromId() only exists for convenience and internally
  redirects to Repository::formatFromId().

TEST PLAN
  make test, added unit test

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  addFormatGetters (branched from master)

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

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

To: dhaumann, cullmann, vkrause
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180729/505b93d5/attachment.html>


More information about the KWrite-Devel mailing list