diff options
Diffstat (limited to 'tools/qmllint/main.cpp')
| -rw-r--r-- | tools/qmllint/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 235ec16c6e..56f72dd020 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -50,7 +50,8 @@ static bool lint_file(const QString &filename, const bool silent, const bool war { QFile file(filename); if (!file.open(QFile::ReadOnly)) { - qWarning() << "Failed to open file" << filename << file.error(); + if (!silent) + qWarning() << "Failed to open file" << filename << file.error(); return false; } @@ -76,7 +77,7 @@ static bool lint_file(const QString &filename, const bool silent, const bool war if (success && !isJavaScript && warnUnqualied) { auto root = parser.rootNode(); - FindUnqualifiedIDVisitor v { qmltypeDirs, code, filename}; + FindUnqualifiedIDVisitor v { qmltypeDirs, code, filename, silent }; root->accept(&v); success = v.check(); } @@ -122,9 +123,9 @@ int main(int argv, char *argc[]) // use host qml import path as a sane default if nothing else has been provided QStringList qmltypeDirs = parser.isSet(qmltypesDirsOption) ? parser.values(qmltypesDirsOption) #ifndef QT_BOOTSTRAPPED - : QStringList{QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)}; + : QStringList{QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath), QLatin1String(".")}; #else - : QStringList{}; + : QStringList{QLatin1String(".")}; #endif #else bool silent = false; |
