Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0
-
None
-
f2abfb39d775deffe16fe08a58c9518bd12c43f3
Description
QDebug operator<< for const char* performs a conversion from utf8 to QString each time it is called which degrades performance. While it is possible to avoid it (by wrapping each string in QStringLiteral) this is inconvenient. IMO const char* overload should avoid performing full conversion to UTF-16.
Situation is quite similar for QLatin1String - it may end up converting to QString as well which IMO defeats the purpose of having that QLatin1String overload in the first place.
I understand that QtMessageHandler receives QString as its input but this makes logging slow and maybe it should be improved.