how to get the list of keywords in KSyntaxHighlighting

Alexander Semke alexander.semke at
Sun Jul 15 10:54:01 BST 2018


I'd like to remove the maintenance of syntax keywords in Cantor (e.g. https:// and to 
switch to KSyntaxHighlighting.

Cantor uses its own highlighters and I'd need to get the list of keywords from 
KSyntaxHighlighter for this (constructor in
tree/src/backends/maxima/maximahighlighter.cpp). If I see it correctly, 
DefinitionData holding the keyword lists is not part of the public API. I don't 
see how to get the list of keywords.

Ideally, there should be something like

QStringList Definition::keywordListsNames() const;

to get the list of available section in the xml syntax file and

QStringList Definition::keyworkList(const QString& name) const;

to get the actual keywords for the specified section.

Would this make sense or is there already another way to get the keywords?


More information about the Kde-frameworks-devel mailing list