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

Function decode

kdevplatform/util/environmentprofilelist.cpp:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void decode(KConfig* config, EnvironmentProfileListPrivate* d)
42{
43 KConfigGroup cfg(config, Strings::envGroup());
44 d->m_defaultProfileName = cfg.readEntry(Strings::defaultEnvProfileKey(), Strings::defaultProfileName());
45 const QStringList profileNames =
46 cfg.readEntry(Strings::profileListKey(), QStringList{Strings::defaultProfileName()});
47 for (const auto& profileName : profileNames) {
48 KConfigGroup envgrp(&cfg, profileName);
49 QMap<QString, QString> variables;
50 const auto varNames = envgrp.keyList();
51 for (const QString& varname : varNames) {
52 variables[varname] = envgrp.readEntry(varname, QString());
53 }
54
55 d->m_profiles.insert(profileName, variables);
56 }
57}
58
59void encode(KConfig* config, const EnvironmentProfileListPrivate* d)
60{

Callers 2

loadSettingsMethod · 0.85

Calls 7

envGroupFunction · 0.85
defaultEnvProfileKeyFunction · 0.85
defaultProfileNameFunction · 0.85
profileListKeyFunction · 0.85
readEntryMethod · 0.80
QStringClass · 0.70
insertMethod · 0.45

Tested by

no test coverage detected