work save

This commit is contained in:
royqh1979 2021-08-02 22:21:50 +08:00
parent 24b69f5749
commit f16ca99a55
2 changed files with 5 additions and 4 deletions

View File

@ -102,6 +102,8 @@ MainWindow::MainWindow(QWidget *parent)
mPreviousHeight = 250;
connect(ui->debugConsole,&QConsole::commandInput,this,&MainWindow::onDebugCommandInput);
connect(ui->cbEvaluate->lineEdit(), &QLineEdit::returnPressed,
this, &MainWindow::onDebugEvaluateInput);
}
MainWindow::~MainWindow()
@ -1484,9 +1486,9 @@ void MainWindow::on_actionExit_triggered()
close();
}
void MainWindow::on_cbEvaluate_textActivated(const QString &arg1)
void MainWindow::onDebugEvaluateInput()
{
QString s=arg1.trimmed();
QString s=ui->cbEvaluate->currentText().trimmed();
if (!s.isEmpty()) {
mDebugger->sendCommand("print",s,false);
}

View File

@ -166,8 +166,6 @@ private slots:
void on_actionExit_triggered();
void on_cbEvaluate_textActivated(const QString &arg1);
public slots:
void onCompileLog(const QString& msg);
void onCompileIssue(PCompileIssue issue);
@ -177,6 +175,7 @@ public slots:
void onRunFinished();
void cleanUpCPUDialog();
void onDebugCommandInput(const QString& command);
void onDebugEvaluateInput();
private:
void setupActions();