forked from qt-creator/qt-creator
CMake: Fix project parsing notification
This builds on top of 08677c0b01 and
fixes one more code path to go through a common entry/exit point.
Change-Id: I1d00fa9242f247028e5d3b0ef3b5fe1d3f4cb03d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -25,8 +25,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "builddirparameters.h"
|
||||
#include "cmakebuildtarget.h"
|
||||
#include "cmakeconfigitem.h"
|
||||
#include "cmakeproject.h"
|
||||
#include "cmaketool.h"
|
||||
|
||||
#include <cpptools/cpprawprojectpart.h>
|
||||
@@ -38,6 +39,8 @@
|
||||
#include <QFutureInterface>
|
||||
#include <QObject>
|
||||
|
||||
namespace ProjectExplorer { class FileNode; }
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -49,52 +52,19 @@ class BuildDirReader : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
struct Parameters {
|
||||
Parameters();
|
||||
Parameters(const CMakeBuildConfiguration *bc);
|
||||
Parameters(const Parameters &other);
|
||||
static BuildDirReader *createReader(const BuildDirParameters &p);
|
||||
virtual void setParameters(const BuildDirParameters &p);
|
||||
|
||||
QString projectName;
|
||||
|
||||
Utils::FileName sourceDirectory;
|
||||
Utils::FileName buildDirectory;
|
||||
Utils::Environment environment;
|
||||
Utils::FileName cmakeExecutable;
|
||||
CMakeTool::Version cmakeVersion;
|
||||
bool cmakeHasServerMode = false;
|
||||
CMakeTool::PathMapper pathMapper;
|
||||
|
||||
QByteArray cxxToolChainId;
|
||||
QByteArray cToolChainId;
|
||||
|
||||
Utils::FileName sysRoot;
|
||||
|
||||
Utils::MacroExpander *expander = nullptr;
|
||||
|
||||
CMakeConfig configuration;
|
||||
|
||||
QString generator;
|
||||
QString extraGenerator;
|
||||
QString platform;
|
||||
QString toolset;
|
||||
QStringList generatorArguments;
|
||||
bool isAutorun = false;
|
||||
};
|
||||
|
||||
static BuildDirReader *createReader(const BuildDirReader::Parameters &p);
|
||||
virtual void setParameters(const Parameters &p);
|
||||
|
||||
virtual bool isCompatible(const Parameters &p) = 0;
|
||||
virtual bool isCompatible(const BuildDirParameters &p) = 0;
|
||||
virtual void resetData() = 0;
|
||||
virtual void parse(bool force) = 0;
|
||||
virtual void parse(bool forceConfiguration) = 0;
|
||||
virtual void stop() = 0;
|
||||
|
||||
virtual bool isReady() const { return true; }
|
||||
virtual bool isParsing() const = 0;
|
||||
virtual bool hasData() const = 0;
|
||||
|
||||
virtual QList<CMakeBuildTarget> takeBuildTargets() = 0;
|
||||
virtual CMakeConfig takeParsedConfiguration() = 0;
|
||||
virtual QList<CMakeBuildTarget> buildTargets() const = 0;
|
||||
virtual void generateProjectTree(CMakeProjectNode *root,
|
||||
const QList<const ProjectExplorer::FileNode *> &allFiles) = 0;
|
||||
virtual void updateCodeModel(CppTools::RawProjectParts &rpps) = 0;
|
||||
@@ -107,7 +77,7 @@ signals:
|
||||
void errorOccured(const QString &message) const;
|
||||
|
||||
protected:
|
||||
Parameters m_parameters;
|
||||
BuildDirParameters m_parameters;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user