summaryrefslogtreecommitdiff
path: root/src/plugins/genericprojectmanager
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-03-30 13:59:12 +0200
committerEike Ziller <eike.ziller@qt.io>2017-03-30 13:59:12 +0200
commitbac2e6c17a74325b106c3d60cfcc4b80c39f0fb9 (patch)
tree9f3203bc8be098061b8646b66d8993c2f5783084 /src/plugins/genericprojectmanager
parent61b6aa5c843481aeff012048c09710170dfa75ad (diff)
parent5afc149b6941268fda972a16579c366f3fb67722 (diff)
downloadqt-creator-bac2e6c17a74325b106c3d60cfcc4b80c39f0fb9.tar.gz
Merge remote-tracking branch 'origin/4.3'
Conflicts: src/plugins/cmakeprojectmanager/servermodereader.cpp Change-Id: I58e7b33d32c41cb48a24a5638ddb256212dd6107
Diffstat (limited to 'src/plugins/genericprojectmanager')
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp23
-rw-r--r--src/plugins/genericprojectmanager/genericproject.h8
2 files changed, 15 insertions, 16 deletions
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index 7c6954bd89..d125b58889 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -157,11 +157,11 @@ private:
//
////////////////////////////////////////////////////////////////////////////////////
-GenericProject::GenericProject(const Utils::FileName &fileName)
- : m_cppCodeModelUpdater(new CppTools::CppProjectUpdater(this))
+GenericProject::GenericProject(const Utils::FileName &fileName) :
+ Project(Constants::GENERICMIMETYPE, fileName, [this]() { refresh(Everything); }),
+ m_cppCodeModelUpdater(new CppTools::CppProjectUpdater(this))
{
setId(Constants::GENERICPROJECT_ID);
- setDocument(new GenericProjectFile(this, fileName, GenericProject::Everything));
setProjectContext(Context(GenericProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
@@ -174,14 +174,15 @@ GenericProject::GenericProject(const Utils::FileName &fileName)
m_includesFileName = QFileInfo(dir, projectName + ".includes").absoluteFilePath();
m_configFileName = QFileInfo(dir, projectName + ".config").absoluteFilePath();
- m_filesIDocument = new GenericProjectFile(this, FileName::fromString(m_filesFileName), GenericProject::Files);
- m_includesIDocument = new GenericProjectFile(this, FileName::fromString(m_includesFileName), GenericProject::Configuration);
- m_configIDocument = new GenericProjectFile(this, FileName::fromString(m_configFileName), GenericProject::Configuration);
-
- DocumentManager::addDocument(document());
- DocumentManager::addDocument(m_filesIDocument);
- DocumentManager::addDocument(m_includesIDocument);
- DocumentManager::addDocument(m_configIDocument);
+ m_filesIDocument
+ = new ProjectDocument(Constants::GENERICMIMETYPE, FileName::fromString(m_filesFileName),
+ [this]() { refresh(Files); });
+ m_includesIDocument
+ = new ProjectDocument(Constants::GENERICMIMETYPE, FileName::fromString(m_includesFileName),
+ [this]() { refresh(Configuration); });
+ m_configIDocument
+ = new ProjectDocument(Constants::GENERICMIMETYPE, FileName::fromString(m_configFileName),
+ [this]() { refresh(Configuration); });
}
GenericProject::~GenericProject()
diff --git a/src/plugins/genericprojectmanager/genericproject.h b/src/plugins/genericprojectmanager/genericproject.h
index 2b05eaf9bb..118ec01f41 100644
--- a/src/plugins/genericprojectmanager/genericproject.h
+++ b/src/plugins/genericprojectmanager/genericproject.h
@@ -32,8 +32,6 @@ namespace CppTools { class CppProjectUpdater; }
namespace GenericProjectManager {
namespace Internal {
-class GenericProjectFile;
-
class GenericProject : public ProjectExplorer::Project
{
Q_OBJECT
@@ -76,9 +74,9 @@ private:
QString m_filesFileName;
QString m_includesFileName;
QString m_configFileName;
- GenericProjectFile *m_filesIDocument;
- GenericProjectFile *m_includesIDocument;
- GenericProjectFile *m_configIDocument;
+ ProjectExplorer::ProjectDocument *m_filesIDocument;
+ ProjectExplorer::ProjectDocument *m_includesIDocument;
+ ProjectExplorer::ProjectDocument *m_configIDocument;
QStringList m_rawFileList;
QStringList m_files;
QHash<QString, QString> m_rawListEntries;