File indexing completed on 2024-04-28 05:38:39
0001 #define QT_USE_QSTRINGBUILDER 0002 #include <QtCore/QString> 0003 0004 void test() 0005 { 0006 const auto s1 = "tests/" + QString::fromLatin1("foo"); // Warning 0007 const auto s2 = "tests/" % QString::fromLatin1("foo"); // Warning 0008 const QString s3 = "tests/" + QString::fromLatin1("foo"); // OK 0009 const QString s4 = "tests/" % QString::fromLatin1("foo"); // OK 0010 0011 [] { 0012 return "tests/" % QString::fromLatin1("foo"); // Warn 0013 }; 0014 0015 [] { 0016 return QString(); // OK 0017 }; 0018 } 0019