summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativedirparser.cpp
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-03-18 14:54:02 (GMT)
committermae <qt-info@nokia.com>2010-03-19 15:18:53 (GMT)
commitd039e2e8307bd272eedc5beae4ecf1a14e47def5 (patch)
tree992d9b32eb494c3636ac7b09ecb6442d4ea0441f /src/declarative/qml/qdeclarativedirparser.cpp
parent7ac2e0cf47628c5a7ea08a5e3058c8bc55fbdd46 (diff)
downloadQt-d039e2e8307bd272eedc5beae4ecf1a14e47def5.zip
Qt-d039e2e8307bd272eedc5beae4ecf1a14e47def5.tar.gz
Qt-d039e2e8307bd272eedc5beae4ecf1a14e47def5.tar.bz2
Fix local type lookup
This change removes the hacky final baseUrl+TypeName+".qml" lookup. In order to still support internal files in remote modules, a new qmldir keyword "internal" is introduced.
Diffstat (limited to 'src/declarative/qml/qdeclarativedirparser.cpp')
-rw-r--r--src/declarative/qml/qdeclarativedirparser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp
index b6d2115..0e82098 100644
--- a/src/declarative/qml/qdeclarativedirparser.cpp
+++ b/src/declarative/qml/qdeclarativedirparser.cpp
@@ -151,6 +151,16 @@ bool QDeclarativeDirParser::parse()
_plugins.append(entry);
+ } else if (sections[0] == QLatin1String("internal")) {
+ if (sectionCount != 3) {
+ reportError(lineNumber, -1,
+ QString::fromUtf8("internal types require 2 arguments, but %1 were provided").arg(sectionCount + 1));
+ continue;
+ }
+ Component entry(sections[1], sections[2], -1, -1);
+ entry.internal = true;
+ _components.append(entry);
+
} else if (sectionCount == 2) {
// No version specified (should only be used for relative qmldir files)
const Component entry(sections[0], sections[1], -1, -1);