MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / cloneSession

Method cloneSession

src/plugins/core/session/sessionmanager.cpp:213–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213bool SessionManager::cloneSession(const QString &select, const QString &clone)
214{
215 if (!d->sessionList.contains(select))
216 return false;
217
218 QFile file(sessionFile(select));
219 if (!file.exists() || file.copy(sessionFile(clone))) {
220 d->sessionList.insert(1, clone);
221 d->sessionDateTimes.insert(clone, QFileInfo(sessionFile(clone)).lastModified());
222 Q_EMIT sessionCreated(clone);
223 return true;
224 }
225 return false;
226}
227
228void SessionManager::showSessionManager()
229{

Callers 1

cloneCurrentSessionMethod · 0.45

Calls 4

copyMethod · 0.80
insertMethod · 0.80
containsMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected