summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlengine.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-09 02:32:22 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-09 02:32:22 (GMT)
commit2f653cc06b97b443b9832d0121dbf92b35dd32c2 (patch)
tree5929efcc1e746414cac18e3a02e3d1bff59edd0e /src/declarative/qml/qmlengine.cpp
parent64d94b747dfa2448d9ba0157fc2a44c13cf4b1d5 (diff)
downloadQt-2f653cc06b97b443b9832d0121dbf92b35dd32c2.zip
Qt-2f653cc06b97b443b9832d0121dbf92b35dd32c2.tar.gz
Qt-2f653cc06b97b443b9832d0121dbf92b35dd32c2.tar.bz2
Remove old implicit module support.
Previously, it was allowed to use type qualification to refer to types defined in subdirectories - indeed, this was the only form of modularity. This is no longer desirable since we have good import features. Task-number: QTBUG-7721
Diffstat (limited to 'src/declarative/qml/qmlengine.cpp')
-rw-r--r--src/declarative/qml/qmlengine.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index bb26d30..f4dcb7a 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -1276,14 +1276,12 @@ public:
QmlEnginePrivate::ImportedNamespace *s = 0;
int slash = type.indexOf('/');
if (slash >= 0) {
- while (!s) {
- s = set.value(QString::fromUtf8(type.left(slash)));
- int nslash = type.indexOf('/',slash+1);
- if (nslash > 0)
- slash = nslash;
- else
- break;
- }
+ s = set.value(QString::fromUtf8(type.left(slash)));
+ if (!s)
+ return false; // qualifier must be a namespace
+ int nslash = type.indexOf('/',slash+1);
+ if (nslash > 0)
+ return false; // only single qualification allowed
} else {
s = &unqualifiedset;
}