logic: cleaned up code for SourceGroupSettings and Wizzard
* Flattened sourcegroupsettings class hierarchy by moving cross compilation options to own base class * QtProjectWizzardContentFlags constructor required correct settings object to reduce the need for type casting * QtProjectWizzardContentPath constructors required correct settings objects * moved SourcePaths from SourceGroupSettingsJava to SourceGroupSettingsJavaEmpty because they are not required for Gradle and Maven projects * removed classpath from maven and gradle source group settings * reuse code of SourceGroup for "show source files" in wizard
This commit is contained in:
@@ -1,26 +1,34 @@
|
||||
#include "settings/SourceGroupSettingsCppEmpty.h"
|
||||
|
||||
SourceGroupSettingsCppEmpty::SourceGroupSettingsCppEmpty(const std::string& id, const ProjectSettings* projectSettings)
|
||||
: SourceGroupSettingsCxxEmpty(id, SOURCE_GROUP_CPP_EMPTY, projectSettings)
|
||||
: SourceGroupSettingsCxx(id, SOURCE_GROUP_CPP_EMPTY, projectSettings)
|
||||
{
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCppEmpty::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxxEmpty::load(config);
|
||||
SourceGroupSettingsCxx::load(config);
|
||||
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettingsWithCppStandard::load(config, key);
|
||||
SourceGroupSettingsWithCxxCrossCompilationOptions::load(config, key);
|
||||
SourceGroupSettingsWithSourceExtensions::load(config, key);
|
||||
SourceGroupSettingsWithSourcePaths::load(config, key);
|
||||
SourceGroupSettingsWithExcludeFilters::load(config, key);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCppEmpty::save(std::shared_ptr<ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettingsCxxEmpty::save(config);
|
||||
SourceGroupSettingsCxx::save(config);
|
||||
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettingsWithCppStandard::save(config, key);
|
||||
SourceGroupSettingsWithCxxCrossCompilationOptions::save(config, key);
|
||||
SourceGroupSettingsWithSourceExtensions::save(config, key);
|
||||
SourceGroupSettingsWithSourcePaths::save(config, key);
|
||||
SourceGroupSettingsWithExcludeFilters::save(config, key);
|
||||
}
|
||||
|
||||
bool SourceGroupSettingsCppEmpty::equals(std::shared_ptr<SourceGroupSettings> other) const
|
||||
@@ -29,8 +37,12 @@ bool SourceGroupSettingsCppEmpty::equals(std::shared_ptr<SourceGroupSettings> ot
|
||||
|
||||
return (
|
||||
otherCxxEmpty &&
|
||||
SourceGroupSettingsCxxEmpty::equals(other) &&
|
||||
SourceGroupSettingsWithCppStandard::equals(otherCxxEmpty)
|
||||
SourceGroupSettingsCxx::equals(other) &&
|
||||
SourceGroupSettingsWithCppStandard::equals(otherCxxEmpty) &&
|
||||
SourceGroupSettingsWithCxxCrossCompilationOptions::equals(otherCxxEmpty) &&
|
||||
SourceGroupSettingsWithSourceExtensions::equals(otherCxxEmpty) &&
|
||||
SourceGroupSettingsWithSourcePaths::equals(otherCxxEmpty) &&
|
||||
SourceGroupSettingsWithExcludeFilters::equals(otherCxxEmpty)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user