SUMMARY SyntaxHighlighter::SyntaxHighlighter(QObject*) hands off its argument to QSyntaxHighlighter; this function does NOT check if the parent it receives that way is a valid pointer. Code should thus be obliged to pass a parent pointer explicitly - QSyntaxHighlighter does this too (no default value). STEPS TO REPRODUCE 1. Create a KSyntaxHighlighting instance by, for instance, `KSyntaxHighlighting::SyntaxHighlighter syntaxHighlighter;` OBSERVED RESULT A crash will result in QSyntaxHighlighter::QSyntaxHighligher(). EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I think it does in all Qt versions we atm support with frameworks: https://code.qt.io/cgit/qt/qtbase.git/commit/src/gui/text/qsyntaxhighlighter.cpp?id=16cb578a8d102f1c937dcc3a07b88b24c9ed685a
That patch seems to be in since Qt 5.12, given we require ATM Qt 5.15 I see no reason to alter the API now.
my bad, I must have looked at the sources of an older Qt version (and didn't see any change in Qt's API documentation).