forked from qt-creator/qt-creator
QmlJS: Dump builtins per Qt version.
Change-Id: I7b5179c4b33c24e83baf0536d158dd48d277637f Reviewed-on: http://codereview.qt.nokia.com/1305 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
committed by
Fawzi Mohamed
parent
23decd9d34
commit
4285b48455
@@ -1215,10 +1215,10 @@ const Value *Function::invoke(const Activation *activation) const
|
||||
// typing environment
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
QHash<QString, FakeMetaObject::ConstPtr> CppQmlTypesLoader::builtinObjects;
|
||||
QHash<QString, QList<LanguageUtils::ComponentVersion> > CppQmlTypesLoader::builtinPackages;
|
||||
CppQmlTypesLoader::BuiltinObjects CppQmlTypesLoader::defaultLibraryObjects;
|
||||
CppQmlTypesLoader::BuiltinObjects CppQmlTypesLoader::defaultQtObjects;
|
||||
|
||||
void CppQmlTypesLoader::loadQmlTypes(const QFileInfoList &qmlTypeFiles, QStringList *errors, QStringList *warnings)
|
||||
CppQmlTypesLoader::BuiltinObjects CppQmlTypesLoader::loadQmlTypes(const QFileInfoList &qmlTypeFiles, QStringList *errors, QStringList *warnings)
|
||||
{
|
||||
QHash<QString, FakeMetaObject::ConstPtr> newObjects;
|
||||
|
||||
@@ -1248,23 +1248,11 @@ void CppQmlTypesLoader::loadQmlTypes(const QFileInfoList &qmlTypeFiles, QStringL
|
||||
}
|
||||
}
|
||||
|
||||
builtinObjects.unite(newObjects);
|
||||
|
||||
QHash<QString, LanguageUtils::FakeMetaObject::ConstPtr>::const_iterator iter
|
||||
= builtinObjects.constBegin();
|
||||
for (; iter != builtinObjects.constEnd(); iter++) {
|
||||
foreach (const FakeMetaObject::Export &exp, iter.value().data()->exports()) {
|
||||
QList<LanguageUtils::ComponentVersion> versions = builtinPackages.value(exp.package);
|
||||
if (!versions.contains(exp.version)) {
|
||||
versions.append(exp.version);
|
||||
builtinPackages.insert(exp.package, versions);
|
||||
}
|
||||
}
|
||||
}
|
||||
return newObjects;
|
||||
}
|
||||
|
||||
void CppQmlTypesLoader::parseQmlTypeDescriptions(const QByteArray &xml,
|
||||
QHash<QString, FakeMetaObject::ConstPtr> *newObjects,
|
||||
BuiltinObjects *newObjects,
|
||||
QString *errorMessage,
|
||||
QString *warningMessage)
|
||||
{
|
||||
|
Reference in New Issue
Block a user