diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-13 14:34:33 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-13 14:34:33 (GMT) |
commit | 7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (patch) | |
tree | ccaeb1246555d2e508e6663ba469ced06f79bb72 /src | |
parent | fa976feb9408ebaa12570997471f63683bdb88a2 (diff) | |
parent | 21711d7ad54b0ee83e776ac3ad83121221fdf24b (diff) | |
download | Qt-7e4a9187bb11b794e45d95d2e9fae026d6b0d07d.zip Qt-7e4a9187bb11b794e45d95d2e9fae026d6b0d07d.tar.gz Qt-7e4a9187bb11b794e45d95d2e9fae026d6b0d07d.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging:
Allow 'typeinfo <file>' lines in qmldir.
qmlplugindump: Use command line options with a single dash.
qmlplugindump: Allow dumping by path without URI.
Move qmldump from Qt Creator to Qt.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativedirparser.cpp | 17 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativedirparser_p.h | 16 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp index b5ad33d..362b99c 100644 --- a/src/declarative/qml/qdeclarativedirparser.cpp +++ b/src/declarative/qml/qdeclarativedirparser.cpp @@ -160,6 +160,16 @@ bool QDeclarativeDirParser::parse() Component entry(sections[1], sections[2], -1, -1); entry.internal = true; _components.append(entry); + } else if (sections[0] == QLatin1String("typeinfo")) { + if (sectionCount != 2) { + reportError(lineNumber, -1, + QString::fromUtf8("typeinfo requires 1 argument, but %1 were provided").arg(sectionCount - 1)); + continue; + } +#ifdef QT_CREATOR + TypeInfo typeInfo(sections[1]); + _typeInfos.append(typeInfo); +#endif } else if (sectionCount == 2) { // No version specified (should only be used for relative qmldir files) @@ -229,4 +239,11 @@ QList<QDeclarativeDirParser::Component> QDeclarativeDirParser::components() cons return _components; } +#ifdef QT_CREATOR +QList<TypeInfo> QDeclarativeDirParser::typeInfos() const +{ + return _typeInfos; +} +#endif + QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h index 95f14bc..d09b90e 100644 --- a/src/declarative/qml/qdeclarativedirparser_p.h +++ b/src/declarative/qml/qdeclarativedirparser_p.h @@ -109,6 +109,19 @@ public: QList<Component> components() const; QList<Plugin> plugins() const; +#ifdef QT_CREATOR + struct TypeInfo + { + TypeInfo() {} + TypeInfo(const QString &fileName) + : fileName(fileName) {} + + QString fileName; + }; + + QList<TypeInfo> typeInfos() const; +#endif + private: void reportError(int line, int column, const QString &message); @@ -118,6 +131,9 @@ private: QString _source; QList<Component> _components; QList<Plugin> _plugins; +#ifdef QT_CREATOR + QList<TypeInfo> _typeInfos; +#endif unsigned _isParsed: 1; }; |