diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-06 13:34:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-10 11:19:22 +0200 |
commit | e7cdb5b6a0e0152297369d57774caae307e1be77 (patch) | |
tree | d65443cc0c3f6d358fe1e74346e3eab64d5193f5 /tracker-test/test.cpp | |
parent | ba038ce052af5ada52a0117c9f13e44cf1c63f1c (diff) |
tracker/test: add a quick way to crash the application
Don't leave home without it.
Diffstat (limited to 'tracker-test/test.cpp')
-rw-r--r-- | tracker-test/test.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tracker-test/test.cpp b/tracker-test/test.cpp index 06a4f1f2..c0bc4ef3 100644 --- a/tracker-test/test.cpp +++ b/tracker-test/test.cpp @@ -8,8 +8,10 @@ #include "test.h" #include "api/plugin-api.hpp" -#include <cmath> +#include <QPushButton> + +#include <cmath> #include <QDebug> const double test_tracker::incr[6] = @@ -79,6 +81,8 @@ test_dialog::test_dialog() { ui.setupUi(this); + connect(ui.buttonBox->button(QDialogButtonBox::Abort), &QPushButton::clicked, []() { *(volatile int*)0 = 0; }); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); } |