D14236: Add some improvements to kate-syntax-highlighter for use in scripting
noreply at phabricator.kde.org
Sun Aug 26 15:31:24 BST 2018
xciml updated this revision to Diff 40467.
xciml marked an inline comment as done.
xciml added a comment.
In D14236#315639 <https://phabricator.kde.org/D14236#315639>, @cullmann wrote:
> I am not sure about the default argument for title, why not just have there QString() and in the code instead of isNull() an isEmpty => use file name fallback.
I'm not sure what you meant by this, did I get it right? I defaulted to a QStringLiteral in the header to make it clear what the default behaviour would be, but this does make it simpler to work with. I also realised that since user input is taken, the title would have to be HTML escaped, so it works out.
> The definitionForMimeType must perhaps use the priority, too, if there are duplicates, like the definitionForFileName function.
I did run into this problem, without checking the priority, the program would return a random match. This should fix it. Thanks for pointing that out!
R216 Syntax Highlighting
CHANGES SINCE LAST UPDATE
To: xciml, #framework_syntax_highlighting, vkrause
Cc: cullmann, pino, kde-frameworks-devel, kwrite-devel, #framework_syntax_highlighting, bmortimer, michaelh, genethomas, kevinapavew, ngraham, bruns, demsking, vkrause, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel