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

Function saveState

app/main.cpp:155–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153
154private Q_SLOTS:
155 void saveState( QSessionManager& sm ) {
156 if (KDevelop::Core::self() && KDevelop::Core::self()->sessionController()) {
157 const auto activeSession = KDevelop::Core::self()->sessionController()->activeSession();
158 if (!activeSession) {
159 qCWarning(APP) << "No active session, can't save state";
160 return;
161 }
162
163 const QString x11SessionId = sm.sessionId() + QLatin1Char('_') + sm.sessionKey();
164 QString kdevelopSessionId = activeSession->id().toString();
165 sm.setRestartCommand({
166 QCoreApplication::applicationFilePath(),
167 QStringLiteral("-session"),
168 x11SessionId,
169 QStringLiteral("-s"),
170 kdevelopSessionId
171 });
172 }
173 }
174};
175
176/// Tries to find a session identified by @p data in @p sessions.

Callers 2

rowsAboutToBeRemovedMethod · 0.85
aboutToShutdownMethod · 0.85

Calls 4

sessionControllerMethod · 0.80
activeSessionMethod · 0.45
toStringMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected