Bug 476110

Summary: Missing includes and stuff with QString
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Igor Mironchik <igor.mironchik>
Component: frameworkAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: waqar.17a
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Igor Mironchik 2023-10-26 12:46:43 UTC
SUMMARY

Not sure how do you build this project, but my experience shows that you missed some minor but annoying stuff. Look.

In ansihighlighter.cpp you missed including QStringBuilder, that leads to build errors with % operator.

In highlightingdata.cpp you have a line of code:

initRuleData(rule.data.anyChar, c.toLower() + c.toUpper());

that leads to build error qith unknown QChar + QChar operator. Fix is quite simple:

initRuleData(rule.data.anyChar, QString(c.toLower()) + c.toUpper());

Maybe you use some PCH? Maybe something else, but I use syntax-highlighting im my own project, and I was forced to make these small changes to build.
Comment 1 Igor Mironchik 2023-10-26 12:50:27 UTC
I use version 5.240.0 from GitHub repository and build with Qt 6!
Comment 2 Waqar Ahmed 2023-10-26 13:35:12 UTC
If you set the define "-DQT_USE_QSTRINGBUILDER", then you will not have this issue.