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

Method loadCheckSetSelection

plugins/clazy/checksetselectionmanager.cpp:225–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225CheckSetSelection 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
249void CheckSetSelectionManager::saveCheckSetSelection(const CheckSetSelection& checkSetSelection) const
250{

Callers

nothing calls this directly

Calls 7

readEntryMethod · 0.80
baseNameMethod · 0.80
QStringClass · 0.70
QFileInfoClass · 0.50
setIdMethod · 0.45
setNameMethod · 0.45
setSelectionMethod · 0.45

Tested by

no test coverage detected