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

Method run2Console

src/plugins/console/consolemanager.cpp:243–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void 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
262void ConsoleManager::showEvent(QShowEvent *event)
263{

Callers

nothing calls this directly

Calls 9

workingDirectoryMethod · 0.80
changeDirMethod · 0.80
environmentMethod · 0.80
toStringMethod · 0.45
isEmptyMethod · 0.45
setEnvironmentMethod · 0.45
programMethod · 0.45
argumentsMethod · 0.45
sendTextMethod · 0.45

Tested by

no test coverage detected