[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: QString -> QStringLiteral conversions might make applications crash on exit
From: Nick Shaforostoff <shafff () ukr ! net>
Date: 2016-02-26 11:14:59
Message-ID: 1456484561.299738758.86ywdhl2 () frv38 ! fwdcdn ! com
[Download RAW message or body]
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic