| 241 | } |
| 242 | |
| 243 | void ConsoleManager::run2Console(const QUuid &uuid, const QProcess &process) |
| 244 | { |
| 245 | auto ptr_term = findConsole(uuid.toString()); |
| 246 | if (!ptr_term) |
| 247 | return; |
| 248 | |
| 249 | if (!process.workingDirectory().isEmpty()) |
| 250 | ptr_term->changeDir(process.workingDirectory()); |
| 251 | if (!process.environment().isEmpty()) |
| 252 | ptr_term->setEnvironment(process.environment()); |
| 253 | if (!process.program().isEmpty()) { |
| 254 | QString cmd = process.program(); |
| 255 | if (!process.arguments().isEmpty()) |
| 256 | cmd += ' ' + process.arguments().join(' '); |
| 257 | cmd += '\n'; |
| 258 | ptr_term->sendText(cmd); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | void ConsoleManager::showEvent(QShowEvent *event) |
| 263 | { |
nothing calls this directly
no test coverage detected