summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-11-02 12:19:56 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-11-02 12:19:56 +0100
commit95524b76e28471b44b52148837cb5bdb7fdf207b (patch)
treefa75c5346cb2b3e27d81668a3c45b695ed0d038b
parent1e658e9b594486c1fa04e438dc7ce88a2ed87222 (diff)
tracker/test: fix "abort" not crashing the app
-rw-r--r--tracker-test/test.cpp5
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()));