Changeset View
Changeset View
Standalone View
Standalone View
sm.cpp
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | |||||
120 | * @see loadSessionInfo | 120 | * @see loadSessionInfo | ||
121 | */ | 121 | */ | ||
122 | void Workspace::storeSession(KConfig* config, SMSavePhase phase) | 122 | void Workspace::storeSession(KConfig* config, SMSavePhase phase) | ||
123 | { | 123 | { | ||
124 | KConfigGroup cg(config, "Session"); | 124 | KConfigGroup cg(config, "Session"); | ||
125 | int count = 0; | 125 | int count = 0; | ||
126 | int active_client = -1; | 126 | int active_client = -1; | ||
127 | 127 | | |||
128 | for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { | 128 | for (auto it = clients.begin(); it != clients.end(); ++it) { | ||
129 | X11Client *c = (*it); | 129 | X11Client *c = (*it); | ||
130 | if (c->windowType() > NET::Splash) { | 130 | if (c->windowType() > NET::Splash) { | ||
131 | //window types outside this are not tooltips/menus/OSDs | 131 | //window types outside this are not tooltips/menus/OSDs | ||
132 | //typically these will be unmanaged and not in this list anyway, but that is not enforced | 132 | //typically these will be unmanaged and not in this list anyway, but that is not enforced | ||
133 | continue; | 133 | continue; | ||
134 | } | 134 | } | ||
135 | QByteArray sessionId = c->sessionId(); | 135 | QByteArray sessionId = c->sessionId(); | ||
136 | QByteArray wmCommand = c->wmCommand(); | 136 | QByteArray wmCommand = c->wmCommand(); | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
199 | } | 199 | } | ||
200 | 200 | | |||
201 | void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds) | 201 | void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds) | ||
202 | { | 202 | { | ||
203 | //TODO clear it first | 203 | //TODO clear it first | ||
204 | KConfigGroup cg(KSharedConfig::openConfig(), QLatin1String("SubSession: ") + name); | 204 | KConfigGroup cg(KSharedConfig::openConfig(), QLatin1String("SubSession: ") + name); | ||
205 | int count = 0; | 205 | int count = 0; | ||
206 | int active_client = -1; | 206 | int active_client = -1; | ||
207 | for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { | 207 | for (auto it = clients.begin(); it != clients.end(); ++it) { | ||
208 | X11Client *c = (*it); | 208 | X11Client *c = (*it); | ||
209 | if (c->windowType() > NET::Splash) { | 209 | if (c->windowType() > NET::Splash) { | ||
210 | continue; | 210 | continue; | ||
211 | } | 211 | } | ||
212 | QByteArray sessionId = c->sessionId(); | 212 | QByteArray sessionId = c->sessionId(); | ||
213 | QByteArray wmCommand = c->wmCommand(); | 213 | QByteArray wmCommand = c->wmCommand(); | ||
214 | if (sessionId.isEmpty()) | 214 | if (sessionId.isEmpty()) | ||
215 | // remember also applications that are not XSMP capable | 215 | // remember also applications that are not XSMP capable | ||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |