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

Method initialize

kdevplatform/shell/workingsetcontroller.cpp:43–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void WorkingSetController::initialize()
44{
45 //Load all working-sets
46 KConfigGroup setConfig(Core::self()->activeSession()->config(), QStringLiteral("Working File Sets"));
47 QMap<QString, QStringList> areaConfigs;
48 const auto sets = setConfig.groupList();
49 for (const QString& set : sets) {
50 // do not load working set if the id contains an '|', because it then belongs to an area.
51 // this is functionally equivalent to the if ( ! config->icon ) stuff which was there before.
52 if (set.contains(QLatin1Char('|'))) {
53 areaConfigs[set.left(set.indexOf(QLatin1Char('|')))] << set;
54 } else if (!setConfig.group(set).hasKey("Orientation") && setConfig.group(set).readEntry("View Count", 0) == 0) {
55 areaConfigs[set] << set;
56 } else {
57 workingSet(set);
58 }
59 }
60
61 // Clean up config
62 for (auto it = areaConfigs.constBegin(); it != areaConfigs.constEnd(); ++it) {
63 if (m_workingSets.contains(it.key())) {
64 continue;
65 }
66 for (auto &areaConfig : it.value()) {
67 setConfig.deleteGroup(areaConfig);
68 }
69 }
70
71 m_emptyWorkingSet = new WorkingSet(QStringLiteral("empty"));
72
73 if(!(Core::self()->setupFlags() & Core::NoUi)) {
74 setupActions();
75 }
76}
77
78void WorkingSetController::cleanup()
79{

Callers

nothing calls this directly

Calls 12

workingSetFunction · 0.85
readEntryMethod · 0.80
constBeginMethod · 0.80
constEndMethod · 0.80
setupFlagsMethod · 0.80
configMethod · 0.45
activeSessionMethod · 0.45
containsMethod · 0.45
indexOfMethod · 0.45
hasKeyMethod · 0.45
keyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected