| 110 | } |
| 111 | |
| 112 | void newSession(const QString& name = {}) |
| 113 | { |
| 114 | auto* session = new Session(QUuid::createUuid().toString()); |
| 115 | if (!name.isEmpty()) { |
| 116 | session->setName(name); |
| 117 | } |
| 118 | |
| 119 | KProcess::startDetached(ShellExtension::getInstance()->executableFilePath(), QStringList() << QStringLiteral("-s") << session->id().toString() << standardArguments()); |
| 120 | delete session; |
| 121 | #if 0 |
| 122 | //Terminate this instance of kdevelop if the user agrees |
| 123 | const auto windows = Core::self()->uiController()->controller()->mainWindows(); |
| 124 | for (Sublime::MainWindow* window : windows) { |
| 125 | window->close(); |
| 126 | } |
| 127 | #endif |
| 128 | } |
| 129 | |
| 130 | void newNamedSession() |
| 131 | { |
no test coverage detected