Commit 07d54af0 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

don't auto deduce QStringBuilder

see 'auto QString(Builder) considered VERY HARMFUL' thread on kde-devel
https://markmail.org/message/mbrp5ypyhcfk7zjn

What happens is that the type of str ends up being QStringBuilder
instead of QString. The QStringBuilder is destroyed after the semicolon,
and all access to "str" produces undefined behavior.

Never use auto for QString concatenation!

BUG: 439877
parent 1eafa82b
Pipeline #70649 skipped
......@@ -67,7 +67,7 @@ void FileItemLinkingPluginActionLoader::run()
}
} else {
auto connectionName =
const QString connectionName =
QStringLiteral("kactivities_db_resources_")
+ QString::number((quintptr) this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment