From 9aed949bb99b9bf328322457a02ad1a9fb330f2d Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 23 Jan 2017 17:01:22 +0900 Subject: Fix build without features.commandlineparser Change-Id: I3a23e53fc647f5257593e0aece7198eea430cf14 Reviewed-by: Lars Knoll --- tools/qmllint/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/qmllint') diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 211427cc64..45914353a8 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -29,7 +29,9 @@ #include #include #include +#if QT_CONFIG(commandlineparser) #include +#endif #include #include @@ -72,6 +74,7 @@ int main(int argv, char *argc[]) QCoreApplication app(argv, argc); QCoreApplication::setApplicationName("qmllint"); QCoreApplication::setApplicationVersion("1.0"); +#if QT_CONFIG(commandlineparser) QCommandLineParser parser; parser.setApplicationDescription(QLatin1String("QML syntax verifier")); parser.addHelpOption(); @@ -87,8 +90,15 @@ int main(int argv, char *argc[]) } bool silent = parser.isSet(silentOption); +#else + bool silent = false; +#endif bool success = true; +#if QT_CONFIG(commandlineparser) foreach (const QString &filename, parser.positionalArguments()) { +#else + foreach (const QString &filename, app.arguments()) { +#endif success &= lint_file(filename, silent); } -- cgit v1.2.3