| 223 | } |
| 224 | |
| 225 | CheckSetSelection CheckSetSelectionManager::loadCheckSetSelection(const QString& absoluteFilePath) const |
| 226 | { |
| 227 | CheckSetSelection result; |
| 228 | |
| 229 | KConfig configFile(absoluteFilePath, KConfig::SimpleConfig); |
| 230 | |
| 231 | // check version |
| 232 | KConfigGroup formatConfigGroup = configFile.group(QStringLiteral("KDEVCZCS")); |
| 233 | const QString formatVersion = formatConfigGroup.readEntry("Version"); |
| 234 | if (!formatVersion.startsWith(QLatin1String("1."))) { |
| 235 | return result; |
| 236 | } |
| 237 | |
| 238 | result.setId(QFileInfo(absoluteFilePath).baseName()); |
| 239 | |
| 240 | KConfigGroup generalConfigGroup = configFile.group(QStringLiteral("General")); |
| 241 | result.setName(generalConfigGroup.readEntry("Name")); |
| 242 | |
| 243 | KConfigGroup layoutConfigGroup = configFile.group(QStringLiteral("Checks")); |
| 244 | result.setSelection(layoutConfigGroup.readEntry("Selection", QString())); |
| 245 | |
| 246 | return result; |
| 247 | } |
| 248 | |
| 249 | void CheckSetSelectionManager::saveCheckSetSelection(const CheckSetSelection& checkSetSelection) const |
| 250 | { |