> a) Everyone who makes QString -> QStringLiteral replacements should be > extremely careful (which is very difficult, since it is not always > obvious if passing a QString to a function will result in the string > being stored in a global static object). Automated tools like clazy > should then not recommend to use QStringLiteral any more. > > b) Classes like KIconLoader, which are used as global static objects, > should copy all strings that they get to the heap in order to prevent > such crashes (which might also be quite difficult to do consistently).
from what i have seen, at least icons, fonts and regexps are the ones for which stringliterals should be avoided in libraries. i have created a qt issue for mentioning this in qt documentation https://bugreports.qt.io/browse/QTBUG-51418 _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel