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:
@@ -418,7 +418,7 @@ static void findNewFileImports(const Document::Ptr &doc, const Snapshot &snapsho
|
||||
{
|
||||
// scan files and directories that are explicitly imported
|
||||
foreach (const ImportInfo &import, doc->bind()->imports()) {
|
||||
const QString &importName = import.name();
|
||||
const QString &importName = import.path();
|
||||
if (import.type() == ImportInfo::FileImport) {
|
||||
if (! snapshot.document(importName))
|
||||
*importedFiles += importName;
|
||||
@@ -530,7 +530,7 @@ static void findNewLibraryImports(const Document::Ptr &doc, const Snapshot &snap
|
||||
const QStringList importPaths = modelManager->importPaths();
|
||||
foreach (const ImportInfo &import, doc->bind()->imports()) {
|
||||
if (import.type() == ImportInfo::DirectoryImport) {
|
||||
const QString targetPath = import.name();
|
||||
const QString targetPath = import.path();
|
||||
findNewQmlLibraryInPath(targetPath, snapshot, modelManager,
|
||||
importedFiles, scannedPaths, newLibraries);
|
||||
}
|
||||
@@ -539,7 +539,7 @@ static void findNewLibraryImports(const Document::Ptr &doc, const Snapshot &snap
|
||||
if (!import.version().isValid())
|
||||
continue;
|
||||
foreach (const QString &importPath, importPaths) {
|
||||
const QString targetPath = QDir(importPath).filePath(import.name());
|
||||
const QString targetPath = QDir(importPath).filePath(import.path());
|
||||
findNewQmlLibrary(targetPath, import.version(), snapshot, modelManager,
|
||||
importedFiles, scannedPaths, newLibraries);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user