Modified the QML project to notify the DUI model manager when a file is added to the project.

This commit is contained in:
Erik Verbruggen
2009-09-04 17:54:38 +02:00
parent a52209336d
commit cac5663a4f
6 changed files with 18 additions and 1 deletions

View File

@@ -39,6 +39,8 @@
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
#include <duieditor/duimodelmanagerinterface.h>
#include <utils/synchronousprocess.h>
#include <utils/pathchooser.h>
@@ -62,7 +64,8 @@ using namespace QmlProjectManager::Internal;
QmlProject::QmlProject(Manager *manager, const QString &fileName)
: m_manager(manager),
m_fileName(fileName)
m_fileName(fileName),
m_modelManager(ExtensionSystem::PluginManager::instance()->getObject<DuiEditor::DuiModelManagerInterface>())
{
QFileInfo fileInfo(m_fileName);
m_projectName = fileInfo.completeBaseName();
@@ -118,6 +121,7 @@ void QmlProject::parseProject(RefreshOptions options)
if (options & Files) {
m_files = convertToAbsoluteFiles(readLines(filesFileName()));
m_files.removeDuplicates();
m_modelManager->updateSourceFiles(m_files);
}
if (options & Configuration) {