diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-26 00:34:21 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-01-26 00:34:21 +0100 |
commit | 0076c44d3993f377ad6417d3bb08109b608dfbd2 (patch) | |
tree | 498a1f3d0997da8e3959e6a1d47071d56a6ce900 /tools | |
parent | 5f0eab2df3c82a71f70ea5a6535541fa786c6a78 (diff) | |
parent | 9aed949bb99b9bf328322457a02ad1a9fb330f2d (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/quick/util/qquickutilmodule.cpp
tools/qmllint/main.cpp
Change-Id: Ic2283f88c293ca7fc776de3e83eb4c7812309d8a
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmllint/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 99a53110a8..791fb71685 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -29,7 +29,9 @@ #include <QDebug> #include <QFile> #include <QFileInfo> +#if QT_CONFIG(commandlineparser) #include <QCommandLineParser> +#endif #include <QCoreApplication> #include <private/qv4value_p.h> @@ -73,6 +75,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(); @@ -89,8 +92,16 @@ int main(int argv, char *argc[]) } bool silent = parser.isSet(silentOption); +#else + bool silent = false; +#endif bool success = true; +#if QT_CONFIG(commandlineparser) for (const QString &filename : positionalArguments) +#else + const auto arguments = app.arguments(); + for (const QString &filename : arguments) +#endif success &= lint_file(filename, silent); return success ? 0 : -1; |