Hi, On 21/08/2019 11:50, Bogdan Vatra via Development wrote:
Personally I'm not going to waste my time learning 10 sting wrappers and
classes just to make some pico optimizations like:
QString ext = QLatin1String("exe"); // it's terribly wrong and people which
are doing this mistake must be stoned to death!
QString ext = QStringLiteral("exe"); // it's so good and it will save the
planet from extinction!
// But
QString ext1 = QLatin1String("exe") + ext; // it's ok
// and
QString ext = QStringLiteral("exe") + ext; // it's a abomination!
// Even more
QHash<QString, QString> test;
test[QLatin1String("key1")] = QLatin1String("some text %1").arg(1); // wrong
test[QStringLiteral("key1")] = QStringLiteral("some text %1").arg(1); // wrong
again
test[QLatin1String("key1")] = QStringLiteral("some text %1").arg(1); // still
wrong
test[QLatin1String("key1")] = QStringLiteral("some text %1").arg(1); //
victory !!!
How many of these are "mistakes" detectable by tooling? Because if they are, they're a very minor issue.
Thanks, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
