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:
@@ -4,3 +4,40 @@ SourceGroupSettingsJavaEmpty::SourceGroupSettingsJavaEmpty(const std::string& id
|
||||
: SourceGroupSettingsJava(id, SOURCE_GROUP_JAVA_EMPTY, projectSettings)
|
||||
{
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaEmpty::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettings::load(config);
|
||||
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettingsWithSourcePaths::load(config, key);
|
||||
SourceGroupSettingsWithClasspath::load(config, key);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaEmpty::save(std::shared_ptr<ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettings::save(config);
|
||||
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettingsWithSourcePaths::save(config, key);
|
||||
SourceGroupSettingsWithClasspath::save(config, key);
|
||||
}
|
||||
|
||||
bool SourceGroupSettingsJavaEmpty::equals(std::shared_ptr<SourceGroupSettings> other) const
|
||||
{
|
||||
std::shared_ptr<SourceGroupSettingsJavaEmpty> otherJava = std::dynamic_pointer_cast<SourceGroupSettingsJavaEmpty>(other);
|
||||
|
||||
return (
|
||||
otherJava &&
|
||||
SourceGroupSettingsJava::equals(other) &&
|
||||
SourceGroupSettingsWithSourcePaths::equals(otherJava) &&
|
||||
SourceGroupSettingsWithClasspath::equals(otherJava)
|
||||
);
|
||||
}
|
||||
|
||||
const ProjectSettings* SourceGroupSettingsJavaEmpty::getProjectSettings() const
|
||||
{
|
||||
return m_projectSettings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user