| 101 | } |
| 102 | |
| 103 | void 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 | |
| 125 | void CustomBuildSystemConfigWidget::saveTo(KConfig* cfg) |
| 126 | { |
nothing calls this directly
no test coverage detected