Skip to content

Commit 8ee606b

Browse files
authored
Add local echo of interpreter command (#5)
1 parent 5a9cfdc commit 8ee606b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ypspur_gui.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ void YPSpurGUI::on_interpreterCommand_returnPressed()
238238
str.append("\n");
239239
interpreter_.write(str.toLocal8Bit());
240240
ui_->interpreterCommand->setText("");
241+
242+
QString data = str;
243+
mutex_interpreter_output_.lock();
244+
data.replace(QRegExp(" "), " ");
245+
data.replace(QRegExp("\n"), "<br>");
246+
printTextEdit(ui_->interpreterOut, data);
247+
mutex_interpreter_output_.unlock();
241248
}
242249

243250
bool YPSpurGUI::eventFilter(QObject* obj, QEvent* event)

0 commit comments

Comments
 (0)