diff options
| author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-06-22 12:54:19 +0200 |
|---|---|---|
| committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-06-22 13:25:22 +0200 |
| commit | 16b4e4e91ffc04c86cdb6afc67d6a4acc26e734d (patch) | |
| tree | 264de9a4eade464af5d9eba14a393cc4ee34a6a0 /src/plugins/qmlprojectmanager/qmlproject.cpp | |
| parent | eba9157476abfb34c4fe60a1f7911ed8b2a636ec (diff) | |
| download | qt-creator-16b4e4e91ffc04c86cdb6afc67d6a4acc26e734d.tar.gz | |
QmlJS: Fix import path handling in the model manager.
Previously, the model manager always had exactly one import path - but
you can open more than one Qml project at once. Now, we store the union
of all import paths in the model manager.
Reviewed-by: Roberto Raggi
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlproject.cpp')
| -rw-r--r-- | src/plugins/qmlprojectmanager/qmlproject.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 0e65e689fd..b8b01d4c46 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -96,8 +96,6 @@ void QmlProject::parseProject(RefreshOptions options) m_projectItem = qobject_cast<QmlProjectItem*>(component->create()); connect(m_projectItem.data(), SIGNAL(qmlFilesChanged(QSet<QString>, QSet<QString>)), this, SLOT(refreshFiles(QSet<QString>, QSet<QString>))); - connect(m_projectItem.data(), SIGNAL(importPathsChanged()), this, SLOT(refreshImportPaths())); - refreshImportPaths(); } else { Core::MessageManager *messageManager = Core::ICore::instance()->messageManager(); messageManager->printToOutputPane(tr("Error while loading project file!")); @@ -126,6 +124,11 @@ void QmlProject::refresh(RefreshOptions options) if (options & Files) m_rootNode->refresh(); + + QmlJS::ModelManagerInterface::ProjectInfo pinfo(this); + pinfo.sourceFiles = files(); + pinfo.importPaths = importPaths(); + m_modelManager->updateProjectInfo(pinfo); } QStringList QmlProject::convertToAbsoluteFiles(const QStringList &paths) const @@ -186,11 +189,6 @@ void QmlProject::refreshFiles(const QSet<QString> &/*added*/, const QSet<QString m_modelManager->removeFiles(removed.toList()); } -void QmlProject::refreshImportPaths() -{ - m_modelManager->setProjectImportPaths(importPaths()); -} - QString QmlProject::displayName() const { return m_projectName; |
