aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldirparser_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-09-24 17:36:53 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-10-01 14:40:46 +0200
commit564c1038d1645d76004ad93651aa392d71d45490 (patch)
tree6724a918810f91dda0c4f5f5a8de11d655de950f /src/qml/qml/qqmldirparser_p.h
parent64e2fa80015fb7d9e53cc66357870d4ea11f3590 (diff)
qmldir parser: add support for "depends component version" syntax
Dependency declarations are initially for the benefit of qmlimportscanner which does not (yet) use this parser. This patch adds support for dependencies into the qmldir parser for completeness, along with autotests. It is necessary to prevent errors at runtime when parsing a qmldir which contains the "depends" declaration. Task-number: QTBUG-41489 Change-Id: Ief2524a30140c42874f94f1735755b171e15dcf7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/qml/qml/qqmldirparser_p.h')
-rw-r--r--src/qml/qml/qqmldirparser_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/qqmldirparser_p.h b/src/qml/qml/qqmldirparser_p.h
index 54843a13b0..bbe61dfb96 100644
--- a/src/qml/qml/qqmldirparser_p.h
+++ b/src/qml/qml/qqmldirparser_p.h
@@ -119,6 +119,7 @@ public:
};
QHash<QString,Component> components() const;
+ QHash<QString,Component> dependencies() const;
QList<Script> scripts() const;
QList<Plugin> plugins() const;
bool designerSupported() const;
@@ -137,12 +138,14 @@ public:
#endif
private:
+ bool maybeAddComponent(const QString &typeName, const QString &fileName, const QString &version, QHash<QString,Component> &hash, int lineNumber = -1, bool multi = true);
void reportError(quint16 line, quint16 column, const QString &message);
private:
QList<QQmlJS::DiagnosticMessage> _errors;
QString _typeNamespace;
QHash<QString,Component> _components; // multi hash
+ QHash<QString,Component> _dependencies;
QList<Script> _scripts;
QList<Plugin> _plugins;
bool _designerSupported;