diff options
-rw-r--r-- | tracker-test/test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tracker-test/test.cpp b/tracker-test/test.cpp index 86ad4495..c662051e 100644 --- a/tracker-test/test.cpp +++ b/tracker-test/test.cpp @@ -77,7 +77,10 @@ test_dialog::test_dialog() { ui.setupUi(this); - connect(ui.buttonBox->button(QDialogButtonBox::Abort), &QPushButton::clicked, []() { *(volatile int*)0 = 0; }); + connect(ui.buttonBox, &QDialogButtonBox::clicked, [this](QAbstractButton* btn) { + if (btn == ui.buttonBox->button(QDialogButtonBox::Abort)) + *(volatile int*)0 = 0; + }); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); |