Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/workingsets/workingset.cpp
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Line(s) | 241 | foreach( Sublime::View* view, area->views() ) | |||
---|---|---|---|---|---|
242 | recycle.insert( view->document()->documentSpecifier(), area->removeView(view) ); | 242 | recycle.insert( view->document()->documentSpecifier(), area->removeView(view) ); | ||
243 | 243 | | |||
244 | qCDebug(SHELL) << "recycling" << recycle.size() << "old views"; | 244 | qCDebug(SHELL) << "recycling" << recycle.size() << "old views"; | ||
245 | 245 | | |||
246 | Q_ASSERT( area->views().empty() ); | 246 | Q_ASSERT( area->views().empty() ); | ||
247 | 247 | | |||
248 | KConfigGroup setConfig(Core::self()->activeSession()->config(), "Working File Sets"); | 248 | KConfigGroup setConfig(Core::self()->activeSession()->config(), "Working File Sets"); | ||
249 | KConfigGroup setGroup = setConfig.group(m_id); | 249 | KConfigGroup setGroup = setConfig.group(m_id); | ||
250 | KConfigGroup areaGroup = setConfig.group(m_id + '|' + area->title()); | 250 | KConfigGroup areaGroup = setConfig.group(m_id + QLatin1Char('|') + area->title()); | ||
251 | 251 | | |||
252 | loadToArea(area, areaIndex, setGroup, areaGroup, recycle); | 252 | loadToArea(area, areaIndex, setGroup, areaGroup, recycle); | ||
253 | 253 | | |||
254 | // Delete views which were not recycled | 254 | // Delete views which were not recycled | ||
255 | qCDebug(SHELL) << "deleting " << recycle.size() << " old views"; | 255 | qCDebug(SHELL) << "deleting " << recycle.size() << " old views"; | ||
256 | qDeleteAll( recycle ); | 256 | qDeleteAll( recycle ); | ||
257 | 257 | | |||
258 | area->setActiveView(nullptr); | 258 | area->setActiveView(nullptr); | ||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 383 | { | |||
385 | 385 | | |||
386 | bool wasPersistent = isPersistent(); | 386 | bool wasPersistent = isPersistent(); | ||
387 | 387 | | |||
388 | KConfigGroup setConfig(Core::self()->activeSession()->config(), "Working File Sets"); | 388 | KConfigGroup setConfig(Core::self()->activeSession()->config(), "Working File Sets"); | ||
389 | 389 | | |||
390 | KConfigGroup setGroup = setConfig.group(m_id); | 390 | KConfigGroup setGroup = setConfig.group(m_id); | ||
391 | deleteGroupRecursive(setGroup); | 391 | deleteGroupRecursive(setGroup); | ||
392 | 392 | | |||
393 | KConfigGroup areaGroup = setConfig.group(m_id + '|' + area->title()); | 393 | KConfigGroup areaGroup = setConfig.group(m_id + QLatin1Char('|') + area->title()); | ||
394 | QString lastActiveView = areaGroup.readEntry("Active View", ""); | 394 | QString lastActiveView = areaGroup.readEntry("Active View", ""); | ||
395 | deleteGroupRecursive(areaGroup); | 395 | deleteGroupRecursive(areaGroup); | ||
396 | if (area->activeView() && area->activeView()->document()) | 396 | if (area->activeView() && area->activeView()->document()) | ||
397 | areaGroup.writeEntry("Active View", area->activeView()->document()->documentSpecifier()); | 397 | areaGroup.writeEntry("Active View", area->activeView()->document()->documentSpecifier()); | ||
398 | else | 398 | else | ||
399 | areaGroup.writeEntry("Active View", lastActiveView); | 399 | areaGroup.writeEntry("Active View", lastActiveView); | ||
400 | 400 | | |||
401 | saveFromArea(area, areaIndex, setGroup, areaGroup); | 401 | saveFromArea(area, areaIndex, setGroup, areaGroup); | ||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |