forked from qt-creator/qt-creator
CompilationDbManager: Do not create an extra target
The hidden extra target creates all kinds of inconsistencies, e.g. between mini project target selector and target model. Besides, there is no reason why this project manager should behave differently from the others in this respect. Fixes: QTCREATORBUG-23518 Change-Id: I11022f63bed33191f6349681356b4dd9537de50c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -38,12 +38,10 @@
|
|||||||
#include <projectexplorer/gcctoolchain.h>
|
#include <projectexplorer/gcctoolchain.h>
|
||||||
#include <projectexplorer/headerpath.h>
|
#include <projectexplorer/headerpath.h>
|
||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
#include <projectexplorer/kitmanager.h>
|
|
||||||
#include <projectexplorer/namedwidget.h>
|
#include <projectexplorer/namedwidget.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/projectnodes.h>
|
#include <projectexplorer/projectnodes.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchainconfigwidget.h>
|
|
||||||
#include <projectexplorer/toolchainmanager.h>
|
#include <projectexplorer/toolchainmanager.h>
|
||||||
#include <texteditor/textdocument.h>
|
#include <texteditor/textdocument.h>
|
||||||
|
|
||||||
@@ -439,12 +437,7 @@ CompilationDatabaseProject::CompilationDatabaseProject(const Utils::FilePath &pr
|
|||||||
setId(Constants::COMPILATIONDATABASEPROJECT_ID);
|
setId(Constants::COMPILATIONDATABASEPROJECT_ID);
|
||||||
setProjectLanguages(Core::Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
setProjectLanguages(Core::Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
||||||
setDisplayName(projectDirectory().fileName());
|
setDisplayName(projectDirectory().fileName());
|
||||||
|
|
||||||
setBuildSystemCreator([](Target *t) { return new CompilationDatabaseBuildSystem(t); });
|
setBuildSystemCreator([](Target *t) { return new CompilationDatabaseBuildSystem(t); });
|
||||||
|
|
||||||
m_kit.reset(KitManager::defaultKit()->clone());
|
|
||||||
addTargetForKit(m_kit.get());
|
|
||||||
|
|
||||||
setExtraProjectFiles(
|
setExtraProjectFiles(
|
||||||
{projectFile.stringAppended(Constants::COMPILATIONDATABASEPROJECT_FILES_SUFFIX)});
|
{projectFile.stringAppended(Constants::COMPILATIONDATABASEPROJECT_FILES_SUFFIX)});
|
||||||
}
|
}
|
||||||
|
@@ -55,14 +55,7 @@ class CompilationDatabaseProject : public ProjectExplorer::Project
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CompilationDatabaseProject(const Utils::FilePath &filename);
|
explicit CompilationDatabaseProject(const Utils::FilePath &filename);
|
||||||
|
|
||||||
bool needsConfiguration() const override { return false; }
|
|
||||||
|
|
||||||
Utils::FilePath rootPathFromSettings() const;
|
Utils::FilePath rootPathFromSettings() const;
|
||||||
ProjectExplorer::Kit *kit() const { return m_kit.get(); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::unique_ptr<ProjectExplorer::Kit> m_kit;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CompilationDatabaseBuildSystem : public ProjectExplorer::BuildSystem
|
class CompilationDatabaseBuildSystem : public ProjectExplorer::BuildSystem
|
||||||
|
Reference in New Issue
Block a user