aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldirparser.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-24 12:35:13 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-01-24 17:37:34 +0000
commitb9fe2c2bfd99098ad06154d7fa8c104ac63a1257 (patch)
treec375640842da963f005a3c88605b6f24be48bba5 /src/qml/qml/qqmldirparser.cpp
parentca6b787a01ea289bd5c2a3e4ff3c7442a4ff58fc (diff)
Teach QQmlDirParser to ignore the classname keyword
This saves QQmlImport from some unnecessary bad lookups when finding types (due to classname being misinterpreted as belonging as a component). Change-Id: I36e622e357e55e98a5af46911709640c5d8fa291 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmldirparser.cpp')
-rw-r--r--src/qml/qml/qqmldirparser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/qml/qqmldirparser.cpp b/src/qml/qml/qqmldirparser.cpp
index fde7cc4cef..4cca8a4d58 100644
--- a/src/qml/qml/qqmldirparser.cpp
+++ b/src/qml/qml/qqmldirparser.cpp
@@ -188,6 +188,15 @@ bool QQmlDirParser::parse(const QString &source)
_plugins.append(entry);
+ } else if (sections[0] == QLatin1String("classname")) {
+ if (sectionCount < 2) {
+ reportError(lineNumber, 0,
+ QStringLiteral("classname directive requires an argument, but %1 were provided").arg(sectionCount - 1));
+
+ continue;
+ }
+
+ // Ignore these. qmlimportscanner uses them.
} else if (sections[0] == QLatin1String("internal")) {
if (sectionCount != 3) {
reportError(lineNumber, 0,