1
0
Fork 0

Fixed a bug in the Edit Breakpoint dialog that might erase double quotes

#3248
This commit is contained in:
shocoman 2023-10-26 02:08:07 +07:00
parent a4be9f87f5
commit 17bd183de2
2 changed files with 14 additions and 51 deletions

View File

@ -35,6 +35,8 @@ EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
setWindowIcon(DIcon("breakpoint")); setWindowIcon(DIcon("breakpoint"));
loadFromBp(); loadFromBp();
connect(this, SIGNAL(accepted()), this, SLOT(acceptedSlot()));
Config()->loadWindowGeometry(this); Config()->loadWindowGeometry(this);
} }
@ -66,53 +68,22 @@ void copyTruncate(T & dest, QString src)
strncpy_s(dest, src.toUtf8().constData(), _TRUNCATE); strncpy_s(dest, src.toUtf8().constData(), _TRUNCATE);
} }
void EditBreakpointDialog::on_editName_textEdited(const QString & arg1)
{
copyTruncate(mBp.name, arg1);
}
void EditBreakpointDialog::on_editBreakCondition_textEdited(const QString & arg1)
{
copyTruncate(mBp.breakCondition, arg1);
}
void EditBreakpointDialog::on_editLogText_textEdited(const QString & arg1) void EditBreakpointDialog::on_editLogText_textEdited(const QString & arg1)
{ {
ui->checkBoxSilent->setChecked(true); ui->checkBoxSilent->setChecked(true);
copyTruncate(mBp.logText, arg1);
} }
void EditBreakpointDialog::on_editLogCondition_textEdited(const QString & arg1) void EditBreakpointDialog::acceptedSlot()
{ {
copyTruncate(mBp.logCondition, arg1); copyTruncate(mBp.breakCondition, ui->editBreakCondition->text());
} copyTruncate(mBp.logText, ui->editLogText->text());
copyTruncate(mBp.logCondition, ui->editLogCondition->text());
copyTruncate(mBp.commandText, ui->editCommandText->text());
copyTruncate(mBp.commandCondition, ui->editCommandCondition->text());
copyTruncate(mBp.name, ui->editName->text());
void EditBreakpointDialog::on_editCommandText_textEdited(const QString & arg1) mBp.singleshoot = ui->checkBoxSingleshoot->isChecked();
{ mBp.fastResume = ui->checkBoxFastResume->isChecked();
copyTruncate(mBp.commandText, arg1); mBp.hitCount = ui->spinHitCount->value();
} mBp.silent = ui->checkBoxSilent->isChecked();
void EditBreakpointDialog::on_editCommandCondition_textEdited(const QString & arg1)
{
copyTruncate(mBp.commandCondition, arg1);
}
void EditBreakpointDialog::on_checkBoxFastResume_toggled(bool checked)
{
mBp.fastResume = checked;
}
void EditBreakpointDialog::on_spinHitCount_valueChanged(int arg1)
{
mBp.hitCount = arg1;
}
void EditBreakpointDialog::on_checkBoxSilent_toggled(bool checked)
{
mBp.silent = checked;
}
void EditBreakpointDialog::on_checkBoxSingleshoot_toggled(bool checked)
{
mBp.singleshoot = checked;
} }

View File

@ -21,16 +21,8 @@ public:
} }
private slots: private slots:
void on_editName_textEdited(const QString & arg1);
void on_editBreakCondition_textEdited(const QString & arg1);
void on_editLogText_textEdited(const QString & arg1); void on_editLogText_textEdited(const QString & arg1);
void on_editLogCondition_textEdited(const QString & arg1); void acceptedSlot();
void on_editCommandText_textEdited(const QString & arg1);
void on_editCommandCondition_textEdited(const QString & arg1);
void on_checkBoxFastResume_toggled(bool checked);
void on_spinHitCount_valueChanged(int arg1);
void on_checkBoxSilent_toggled(bool checked);
void on_checkBoxSingleshoot_toggled(bool checked);
private: private:
Ui::EditBreakpointDialog* ui; Ui::EditBreakpointDialog* ui;