forked from qt-creator/qt-creator
QmlJS: Separate metaObjectRevision from minor version number.
They need not to be identical. Additionally: * Rename ImportInfo::name to path, because that's what it does. * Add ImportInfo::name, for getting the uri with the names separated by dots. * Allow for exportMetaObjectRevisions in qmltypes files. * Allow for exports with an empty type name, as generated by qmlRegisterRevision. They are used for associating meta object revisions with non-exported types. * Rewrite the Qt 4.7 import to QtQuick 1.0 at an early stage. In preparation for the Qt 5 type information update, where Qt 4.7 is gone. Change-Id: Ia287193623d9530a56b9eb8d2481d50aabd94c3e Reviewed-on: http://codereview.qt-project.org/5309 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -157,11 +157,14 @@ void FakeMetaObject::addExport(const QString &name, const QString &package, Comp
|
||||
exp.type = name;
|
||||
exp.package = package;
|
||||
exp.version = version;
|
||||
exp.packageNameVersion = QString::fromLatin1("%1/%2 %3").arg(
|
||||
package, name,
|
||||
version.toString());
|
||||
m_exports.append(exp);
|
||||
}
|
||||
|
||||
void FakeMetaObject::setExportMetaObjectRevision(int exportIndex, int metaObjectRevision)
|
||||
{
|
||||
m_exports[exportIndex].metaObjectRevision = metaObjectRevision;
|
||||
}
|
||||
|
||||
QList<FakeMetaObject::Export> FakeMetaObject::exports() const
|
||||
{ return m_exports; }
|
||||
FakeMetaObject::Export FakeMetaObject::exportInPackage(const QString &package) const
|
||||
@@ -219,5 +222,8 @@ QString FakeMetaObject::attachedTypeName() const
|
||||
void FakeMetaObject::setAttachedTypeName(const QString &name)
|
||||
{ m_attachedTypeName = name; }
|
||||
|
||||
FakeMetaObject::Export::Export()
|
||||
: metaObjectRevision(0)
|
||||
{}
|
||||
bool FakeMetaObject::Export::isValid() const
|
||||
{ return !type.isEmpty(); }
|
||||
{ return version.isValid() || !package.isEmpty() || !type.isEmpty(); }
|
||||
|
||||
Reference in New Issue
Block a user