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

Method setLauncherForMode

kdevplatform/shell/launchconfiguration.cpp:176–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void LaunchConfiguration::setLauncherForMode(const QString& mode, const QString& id)
177{
178 Q_D(LaunchConfiguration);
179
180 QStringList modes = d->baseGroup.readEntry("Configured Launch Modes", QStringList());
181 int idx = modes.indexOf( mode );
182 if( idx == -1 )
183 {
184 idx = modes.count();
185 modes << mode;
186 d->baseGroup.writeEntry("Configured Launch Modes", modes);
187 }
188 QStringList launchers = d->baseGroup.readEntry("Configured Launchers", QStringList());
189 if( launchers.count() > idx )
190 {
191 launchers.replace(idx, id);
192 } else
193 {
194 launchers.append( id );
195 }
196 d->baseGroup.writeEntry("Configured Launchers", launchers);
197}
198
199
200}

Callers 2

setDataMethod · 0.80

Calls 7

QStringListClass · 0.85
readEntryMethod · 0.80
writeEntryMethod · 0.80
indexOfMethod · 0.45
countMethod · 0.45
replaceMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected