D23061: Possiblity to change Definition data after loading

Dominik Haumann noreply at phabricator.kde.org
Sun Aug 11 08:05:06 BST 2019


dhaumann added a comment.


  Imho the API is currently not clear enough, see comment below. Can we somehow resolve this?

INLINE COMMENTS

> definition.h:339
> +     * @since 5.62
> +     */
> +    bool setKeywordList(const QString& name, const QStringList& content);

Please improve the API documentation and add, for instance:

- Only existing keywordLists() can be changed. For non-existent keyword lists, false is returned.
- @see keywordList(), keywordLists()

What I am currently also missing is a section about highlight invalidation: Does one have to trigger a document rehighlight oneself, and if so, how?

My point is: Assume a doc is highlighted up to line 100. Now you add keywords to a list that are used in these 100 lines, i.e. the highlighting may change arbitrarily.

How is the KSyntaxHighlighting user supposed to trigger a rehighlight? Or should one only change keyword lists before highlighting any document?

REPOSITORY
  R216 Syntax Highlighting

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

To: sirgienko, dhaumann, cullmann, vkrause
Cc: kwrite-devel, kde-frameworks-devel, univerz, LeGast00n, gennad, bmortimer, domson, michaelh, genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190811/9bec0d67/attachment.html>


More information about the KWrite-Devel mailing list