logic: refactored QtProjectWizzard to remove duplicate definition of contents shown for setup and summary
* also added current page count (e.g. 1/3) to project setup * moved the code for copying a source group to the settings classes so that the wizzard doesn't need to know which source groups may be there anymore.
This commit is contained in:
@@ -322,6 +322,8 @@ add_files(
|
||||
settings/SourceGroupSettingsCppEmpty.h
|
||||
settings/SourceGroupSettingsCxxCdb.cpp
|
||||
settings/SourceGroupSettingsCxxCdb.h
|
||||
settings/SourceGroupSettingsCxxCdbVs.cpp
|
||||
settings/SourceGroupSettingsCxxCdbVs.h
|
||||
settings/SourceGroupSettingsCxxCodeblocks.cpp
|
||||
settings/SourceGroupSettingsCxxCodeblocks.h
|
||||
settings/SourceGroupSettingsCxxSonargraph.cpp
|
||||
|
||||
@@ -21,6 +21,8 @@ public:
|
||||
SourceGroupSettings(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings);
|
||||
virtual ~SourceGroupSettings() = default;
|
||||
|
||||
virtual std::shared_ptr<SourceGroupSettings> createCopy() const = 0;
|
||||
|
||||
virtual void load(std::shared_ptr<const ConfigManager> config);
|
||||
virtual void save(std::shared_ptr<ConfigManager> config);
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ SourceGroupSettingsCEmpty::SourceGroupSettingsCEmpty(const std::string& id, cons
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsCEmpty::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsCEmpty>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCEmpty::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxx::load(config);
|
||||
|
||||
@@ -19,6 +19,8 @@ class SourceGroupSettingsCEmpty
|
||||
public:
|
||||
SourceGroupSettingsCEmpty(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ SourceGroupSettingsCppEmpty::SourceGroupSettingsCppEmpty(const std::string& id,
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsCppEmpty::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsCppEmpty>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCppEmpty::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxx::load(config);
|
||||
|
||||
@@ -19,6 +19,8 @@ class SourceGroupSettingsCppEmpty
|
||||
public:
|
||||
SourceGroupSettingsCppEmpty(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -9,6 +9,11 @@ SourceGroupSettingsCxxCdb::SourceGroupSettingsCxxCdb(const std::string& id, cons
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsCxxCdb::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsCxxCdb>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxCdb::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxx::load(config);
|
||||
|
||||
@@ -14,6 +14,8 @@ class SourceGroupSettingsCxxCdb
|
||||
public:
|
||||
SourceGroupSettingsCxxCdb(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "settings/SourceGroupSettingsCxxCdbVs.h"
|
||||
|
||||
SourceGroupSettingsCxxCdbVs::SourceGroupSettingsCxxCdbVs(const std::string& id, const ProjectSettings* projectSettings)
|
||||
: SourceGroupSettingsCxxCdb(id, projectSettings)
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsCxxCdbVs::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsCxxCdbVs>(*this);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_CXX_CDB_VS_H
|
||||
#define SOURCE_GROUP_SETTINGS_CXX_CDB_VS_H
|
||||
|
||||
#include "settings/SourceGroupSettingsCxxCdb.h"
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
class SourceGroupSettingsCxxCdbVs
|
||||
: public SourceGroupSettingsCxxCdb
|
||||
{
|
||||
public:
|
||||
SourceGroupSettingsCxxCdbVs(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
};
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_CDB_VS_H
|
||||
@@ -8,6 +8,11 @@ SourceGroupSettingsCxxCodeblocks::SourceGroupSettingsCxxCodeblocks(const std::st
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsCxxCodeblocks::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsCxxCodeblocks>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxCodeblocks::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxx::load(config);
|
||||
|
||||
@@ -19,6 +19,8 @@ class SourceGroupSettingsCxxCodeblocks
|
||||
public:
|
||||
SourceGroupSettingsCxxCodeblocks(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ SourceGroupSettingsCxxSonargraph::SourceGroupSettingsCxxSonargraph(const std::st
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsCxxSonargraph::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsCxxSonargraph>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxSonargraph::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxx::load(config);
|
||||
|
||||
@@ -15,6 +15,8 @@ class SourceGroupSettingsCxxSonargraph
|
||||
public:
|
||||
SourceGroupSettingsCxxSonargraph(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ SourceGroupSettingsJavaEmpty::SourceGroupSettingsJavaEmpty(const std::string& id
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsJavaEmpty::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsJavaEmpty>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaEmpty::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettings::load(config);
|
||||
|
||||
@@ -13,6 +13,8 @@ class SourceGroupSettingsJavaEmpty
|
||||
public:
|
||||
SourceGroupSettingsJavaEmpty(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ SourceGroupSettingsJavaGradle::SourceGroupSettingsJavaGradle(const std::string&
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsJavaGradle::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsJavaGradle>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaGradle::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsJava::load(config);
|
||||
|
||||
@@ -10,6 +10,8 @@ class SourceGroupSettingsJavaGradle
|
||||
public:
|
||||
SourceGroupSettingsJavaGradle(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ SourceGroupSettingsJavaMaven::SourceGroupSettingsJavaMaven(const std::string& id
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsJavaMaven::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsJavaMaven>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaMaven::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsJava::load(config);
|
||||
|
||||
@@ -10,6 +10,8 @@ class SourceGroupSettingsJavaMaven
|
||||
public:
|
||||
SourceGroupSettingsJavaMaven(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ SourceGroupSettingsJavaSonargraph::SourceGroupSettingsJavaSonargraph(const std::
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsJavaSonargraph::createCopy() const
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsJavaSonargraph>(*this);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaSonargraph::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettings::load(config);
|
||||
|
||||
@@ -15,6 +15,8 @@ class SourceGroupSettingsJavaSonargraph
|
||||
public:
|
||||
SourceGroupSettingsJavaSonargraph(const std::string& id, const ProjectSettings* projectSettings);
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override;
|
||||
|
||||
void load(std::shared_ptr<const ConfigManager> config) override;
|
||||
void save(std::shared_ptr<ConfigManager> config) override;
|
||||
|
||||
|
||||
@@ -293,10 +293,10 @@ namespace Sonargraph
|
||||
|
||||
std::vector<std::shared_ptr<IndexerCommand>> XsdCmakeJsonModule::getIndexerCommandsForRootPath(
|
||||
std::shared_ptr<XsdRootPathWithFiles> rootPath,
|
||||
const std::set<FilePath> indexedHeaderPaths,
|
||||
const std::set<FilePath>& indexedHeaderPaths,
|
||||
const std::string& languageStandard,
|
||||
const std::vector<FilePath> systemHeaderSearchPaths,
|
||||
const std::vector<FilePath> frameworkSearchPaths) const
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths) const
|
||||
{
|
||||
std::vector<std::shared_ptr<IndexerCommand>> indexerCommands;
|
||||
if (rootPath)
|
||||
|
||||
@@ -33,10 +33,10 @@ namespace Sonargraph
|
||||
|
||||
std::vector<std::shared_ptr<IndexerCommand>> getIndexerCommandsForRootPath(
|
||||
std::shared_ptr<XsdRootPathWithFiles> rootPath,
|
||||
const std::set<FilePath> indexedHeaderPaths,
|
||||
const std::set<FilePath>& indexedHeaderPaths,
|
||||
const std::string& languageStandard,
|
||||
const std::vector<FilePath> systemHeaderSearchPaths,
|
||||
const std::vector<FilePath> frameworkSearchPaths) const;
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths) const;
|
||||
|
||||
std::vector<std::shared_ptr<XsdRootPathWithFiles>> m_rootPathWithFiles;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user