Building KSyntaxHighlighting and QString operators

64 Views Asked by At

I try to simplify KSyntaxHighlighting build process for my own purpose, and found the following errors during build:

/home/igor/Work/Tmp/ksyntaxhighlighting/src/highlightingdata.cpp:144: error: ambiguous overload for ‘operator+’ (operand types are ‘QChar’ and ‘QChar’)
/home/igor/Work/Tmp/ksyntaxhighlighting/src/highlightingdata.cpp: In function ‘bool loadRule(const QString&, KSyntaxHighlighting::HighlightingContextData::Rule&, QXmlStreamReader&)’:
/home/igor/Work/Tmp/ksyntaxhighlighting/src/highlightingdata.cpp:144:61: error: ambiguous overload for ‘operator+’ (operand types are ‘QChar’ and ‘QChar’)
  144 |                 initRuleData(rule.data.anyChar, c.toLower() + c.toUpper());
      |                                                 ~~~~~~~~~~~ ^ ~~~~~~~~~~~
      |                                                          |             |
      |                                                          QChar         QChar
/home/igor/Work/Tmp/ksyntaxhighlighting/src/ansihighlighter.cpp:973: error: no match for ‘operator%’ (operand types are ‘QLatin1Char’ and ‘QString’)
/home/igor/Work/Tmp/ksyntaxhighlighting/src/ansihighlighter.cpp: In member function ‘QString {anonymous}::DebugSyntaxHighlighter::extractContextName(KSyntaxHighlighting::StateData*) const’:
/home/igor/Work/Tmp/ksyntaxhighlighting/src/ansihighlighter.cpp:973:39: error: no match for ‘operator%’ (operand types are ‘QLatin1Char’ and ‘QString’)
  973 |             label += QLatin1Char('(') % QString::number(stateData->size()) % QLatin1Char(')');
      |                      ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |                                 |
      |                      QLatin1Char                       QString

Where are these operators from? Where are they defined and implemented? What does possibly generate these operators?

0

There are 0 best solutions below