diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2017-10-25 15:35:30 +0200 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2017-11-01 18:17:53 +0000 |
commit | 17bdee86da84c6718fc1bbe8cedf5bdf07240837 (patch) | |
tree | 1dd0d9595a3e83e03ea3447cc265146f164dfffb /examples/winextras/iconextractor/main.cpp | |
parent | 07f6d25a00af112d46e939992fb9cf42879fc7c1 (diff) |
Revamp Qt Windows Extras examples
Use nullptr, member initialization, new connect syntax, QStringLiteral, etc.
Change-Id: I1404701fcc227f8133bc22548ea1cee02eab4ed9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Diffstat (limited to 'examples/winextras/iconextractor/main.cpp')
-rw-r--r-- | examples/winextras/iconextractor/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/winextras/iconextractor/main.cpp b/examples/winextras/iconextractor/main.cpp index 5e6dbd3..d630f9b 100644 --- a/examples/winextras/iconextractor/main.cpp +++ b/examples/winextras/iconextractor/main.cpp @@ -265,22 +265,22 @@ static const char description[] = int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - QCoreApplication::setApplicationName("Icon Extractor"); - QCoreApplication::setOrganizationName("QtProject"); - QCoreApplication::setApplicationVersion(QT_VERSION_STR); + QCoreApplication::setApplicationName(QStringLiteral("Icon Extractor")); + QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); + QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR)); QCommandLineParser parser; parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsCompactedShortOptions); parser.setApplicationDescription(QLatin1String(description)); parser.addHelpOption(); parser.addVersionOption(); - const QCommandLineOption largeIconOption("large", "Extract large icons"); + const QCommandLineOption largeIconOption(QStringLiteral("large"), QStringLiteral("Extract large icons")); parser.addOption(largeIconOption); - const QCommandLineOption shellIconOption("shell", "Extract shell icons using SHGetFileInfo()"); + const QCommandLineOption shellIconOption(QStringLiteral("shell"), QStringLiteral("Extract shell icons using SHGetFileInfo()")); parser.addOption(shellIconOption); - const QCommandLineOption shellOverlayOption("overlay", "Extract shell overlay icons"); + const QCommandLineOption shellOverlayOption(QStringLiteral("overlay"), QStringLiteral("Extract shell overlay icons")); parser.addOption(shellOverlayOption); - parser.addPositionalArgument("file", "The file to open."); - parser.addPositionalArgument("image file folder", "The folder to store the images."); + parser.addPositionalArgument(QStringLiteral("file"), QStringLiteral("The file to open.")); + parser.addPositionalArgument(QStringLiteral("image file folder"), QStringLiteral("The folder to store the images.")); parser.process(app); const QStringList &positionalArguments = parser.positionalArguments(); if (positionalArguments.isEmpty()) |