MCPcopy Create free account
hub / github.com/baldurk/renderdoc / on_execute_clicked

Method on_execute_clicked

qrenderdoc/Windows/PythonShell.cpp:1092–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1090}
1091
1092void PythonShell::on_execute_clicked()
1093{
1094 QString command = ui->lineInput->text();
1095
1096 ANALYTIC_SET(UIFeatures.PythonInterop, true);
1097
1098 appendText(ui->interactiveOutput, command + lit("\n"));
1099
1100 history.push_front(command);
1101 historyidx = -1;
1102
1103 ui->lineInput->clear();
1104
1105 // assume a trailing colon means there will be continuation. Store the command and add a continue
1106 // prompt. If we're already continuing, then wait until we get a blank line before executing.
1107 if(command.trimmed().right(1) == lit(":") || (!m_storedLines.isEmpty() && !command.isEmpty()))
1108 {
1109 appendText(ui->interactiveOutput, lit(".. "));
1110 m_storedLines += command + lit("\n");
1111 return;
1112 }
1113
1114 // concatenate any previous lines if we are doing a multi-line command.
1115 command = m_storedLines + command;
1116 m_storedLines = QString();
1117
1118 if(command.trimmed().length() > 0)
1119 interactiveContext->executeString(command);
1120
1121 appendText(ui->interactiveOutput, lit(">> "));
1122}
1123
1124void PythonShell::on_clear_clicked()
1125{

Callers

nothing calls this directly

Calls 9

trimmedMethod · 0.80
executeStringMethod · 0.80
QStringFunction · 0.50
textMethod · 0.45
push_frontMethod · 0.45
clearMethod · 0.45
rightMethod · 0.45
isEmptyMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected