ProjectExplorer: Provide ProjectDocument and use it in all projects

Change-Id: I6e054ebf1043bd1f6748f1567f35c68394bd6528
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2017-03-29 11:11:49 +02:00
parent df64242ab2
commit 348aa12eaa
23 changed files with 80 additions and 476 deletions

View File

@@ -41,8 +41,6 @@ namespace CppTools { class CppProjectUpdater; }
namespace GenericProjectManager {
namespace Internal {
class GenericProjectFile;
class GenericProject : public ProjectExplorer::Project
{
Q_OBJECT
@@ -91,9 +89,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;
@@ -105,19 +103,5 @@ private:
ProjectExplorer::Target *m_activeTarget = nullptr;
};
class GenericProjectFile : public Core::IDocument
{
public:
GenericProjectFile(GenericProject *parent, const Utils::FileName &fileName,
GenericProject::RefreshOptions options);
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const override;
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
private:
GenericProject *m_project;
GenericProject::RefreshOptions m_options;
};
} // namespace Internal
} // namespace GenericProjectManager