cullmann added a comment.
If that is more elegant, I would be happy with this a solution, too. The Format() allocations just showed up as a few MBs during heaptrack profiling of KWrite (just loading one large file and rehighlighting it). REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D14956 To: cullmann, vkrause Cc: dhaumann, kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars