diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-07-25 16:59:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-31 00:22:36 +0200 |
commit | c9b7582a2e7ad9fcd03dd999c3b7a16b72803238 (patch) | |
tree | d1ffdb193576fef0c243600f46c69b180d2ad2a8 /src/qml/qml/qqmltypeloader.cpp | |
parent | 2e6accbbbb9783ff6e5ad171f179d5021b0761af (diff) |
Implement strict mode for qmldir modules
Allow a module's qmldir to contain a module directive, which when
present specifies 'strict mode' import processing. In strict mode,
type registrations are only permitted into the namespace identified
in the qmldir file's module directive. In addition, any type
registrations to that namespace originating from other modules are
treated as error conditions.
Task-number: QTBUG-26551
Change-Id: I081bde2d3b83d3f28524440177fb2cd1ccee34ad
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index c66cd283da..0790b7664e 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -1381,6 +1381,11 @@ QList<QQmlError> QQmlTypeLoader::QmldirContent::errors(const QString &uri) const return m_parser.errors(uri); } +QString QQmlTypeLoader::QmldirContent::typeNamespace() const +{ + return m_parser.typeNamespace(); +} + void QQmlTypeLoader::QmldirContent::setContent(const QString &location, const QString &content) { m_location = location; |