Conversation
| queryArgs.addQueryItem(QLatin1String("service"), QLatin1String("files")); | ||
| queryArgs.addQueryItem(QLatin1String("t"), data.value("token").toString()); | ||
| url = QUrl(Utility::concatUrlPath(_account->url(), QLatin1String("public.php"), queryArgs).toString()); | ||
| queryArgs.addQueryItem(u"service"_s, u"files"_s); |
There was a problem hiding this comment.
I'm wondering why these strings don't use the _L1 literal here... does addQueryItem just not accept QLatin1StringViews?
There was a problem hiding this comment.
It's worth to use a QLatinStringView when the method takes a QAnyStringView (atm it's mostly lot of json, xml relared functions and string comparison)
In the other case, the QLatin1String will be converted first to a QString and in these cases a QStringLiteral is faster
There was a problem hiding this comment.
ah, I see! thanks for the explanation :)
Use QLatin1String overload when possible (mostly QJsonObject and string comparaison). See https://www.volkerkrause.eu/2023/09/09/qt-string-bloat.html Save around 11Kib in the final binary. Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
1f6c22c to
c740c34
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-8992.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
|
/backport to stable-3.17 |
|
/backport to stable-4.0 |




Use QLatin1String overload when possible (mostly QJsonObject and string comparaison).
See https://www.volkerkrause.eu/2023/09/09/qt-string-bloat.html
Save around 11Kib in the final binary.