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

Method addSession

kdevplatform/shell/sessioncontroller.cpp:211–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 }
210
211 void addSession( Session* s )
212 {
213 if (Core::self()->setupFlags() & Core::NoUi) {
214 sessionActions[s] = nullptr;
215 return;
216 }
217
218 auto* a = new QAction( grp );
219 a->setText( s->description() );
220 a->setToolTip(s->description());
221 a->setCheckable( false );
222 a->setData(QVariant::fromValue<Session*>(s));
223
224 sessionActions[s] = a;
225 q->actionCollection()->addAction(QLatin1String("session_") + s->id().toString(), a);
226 connect( s, &Session::sessionUpdated, this, &SessionControllerPrivate::sessionUpdated );
227 sessionUpdated( s );
228 }
229
230 SessionController* const q;
231

Callers 3

initializeMethod · 0.45
createSessionMethod · 0.45
cloneSessionMethod · 0.45

Calls 9

setupFlagsMethod · 0.80
setToolTipMethod · 0.80
setTextMethod · 0.45
descriptionMethod · 0.45
setDataMethod · 0.45
addActionMethod · 0.45
actionCollectionMethod · 0.45
toStringMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected