MCPcopy Create free account
hub / github.com/KDE/kdevelop / saveConfig

Method saveConfig

plugins/custom-buildsystem/custombuildsystemconfigwidget.cpp:103–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void CustomBuildSystemConfigWidget::saveConfig( KConfigGroup& grp, const CustomBuildSystemConfig& c, int index )
104{
105 // Generate group name, access and clear it
106 KConfigGroup subgrp = grp.group(ConfigConstants::buildConfigPrefix() + QString::number(index));
107 subgrp.deleteGroup();
108
109 // Write current configuration key, if our group is current
110 if( ui->currentConfig->currentIndex() == index )
111 grp.writeEntry(ConfigConstants::currentConfigKey(), subgrp.name());
112
113 subgrp.writeEntry(ConfigConstants::configTitleKey(), c.title);
114 subgrp.writeEntry<QUrl>(ConfigConstants::buildDirKey(), c.buildDir);
115 for (const CustomBuildSystemTool& tool : c.tools) {
116 KConfigGroup toolgrp = subgrp.group( generateToolGroupName( tool.type ) );
117 toolgrp.writeEntry(ConfigConstants::toolType(), int(tool.type));
118 toolgrp.writeEntry(ConfigConstants::toolEnvironment(), tool.envGrp);
119 toolgrp.writeEntry(ConfigConstants::toolEnabled(), tool.enabled);
120 toolgrp.writeEntry<QUrl>(ConfigConstants::toolExecutable(), tool.executable);
121 toolgrp.writeEntry(ConfigConstants::toolArguments(), tool.arguments);
122 }
123}
124
125void CustomBuildSystemConfigWidget::saveTo(KConfig* cfg)
126{

Callers

nothing calls this directly

Calls 13

buildConfigPrefixFunction · 0.85
currentConfigKeyFunction · 0.85
configTitleKeyFunction · 0.85
buildDirKeyFunction · 0.85
generateToolGroupNameFunction · 0.85
toolTypeFunction · 0.85
toolEnvironmentFunction · 0.85
toolEnabledFunction · 0.85
toolExecutableFunction · 0.85
toolArgumentsFunction · 0.85
writeEntryMethod · 0.80
currentIndexMethod · 0.45

Tested by

no test coverage detected