diff options
author | Kai Koehne <kai.koehne@digia.com> | 2014-07-15 14:33:13 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-07-23 07:44:15 +0200 |
commit | e46d72751ba8188dfc37ad0e8e76198525f8d1f2 (patch) | |
tree | bfef0be9706fff652c53aad9335aa6f609ab5fe8 /src/tools/rcc/main.cpp | |
parent | edfac1a9edb9c9c76ca9a97a0f9d7a5bfd83143b (diff) |
rcc: String literal conversion cleanup
Replace QString::fromUtf8 with QString::fromLatin1 for ascii strings.
Also optimize use of QT_VERSION_STR.
Change-Id: I13c683499c56cb4ac4d2bbd9b6b53c337917e347
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/tools/rcc/main.cpp')
-rw-r--r-- | src/tools/rcc/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp index 0dcbcafb11..81beff8363 100644 --- a/src/tools/rcc/main.cpp +++ b/src/tools/rcc/main.cpp @@ -112,13 +112,13 @@ int createProject(const QString &outFileName) int runRcc(int argc, char *argv[]) { QCoreApplication app(argc, argv); - QCoreApplication::setApplicationVersion(QString::fromLatin1(QT_VERSION_STR)); + QCoreApplication::setApplicationVersion(QStringLiteral(QT_VERSION_STR)); // Note that rcc isn't translated. // If you use this code as an example for a translated app, make sure to translate the strings. QCommandLineParser parser; parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); - parser.setApplicationDescription(QStringLiteral("Qt Resource Compiler version %1").arg(QString::fromLatin1(QT_VERSION_STR))); + parser.setApplicationDescription(QLatin1String("Qt Resource Compiler version " QT_VERSION_STR)); parser.addHelpOption(); parser.addVersionOption(); @@ -266,7 +266,7 @@ int runRcc(int argc, char *argv[]) } else { out.setFileName(outFilename); if (!out.open(mode)) { - const QString msg = QString::fromUtf8("Unable to open %1 for writing: %2\n").arg(outFilename).arg(out.errorString()); + const QString msg = QString::fromLatin1("Unable to open %1 for writing: %2\n").arg(outFilename).arg(out.errorString()); errorDevice.write(msg.toUtf8()); return 1; } |