diff options
author | Stanisław Halik <sthalik@misaki.pl> | 2017-05-14 16:22:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-14 16:22:09 +0200 |
commit | 5c23666b58bb1dd4aea15c0d62a2f716d5be7f52 (patch) | |
tree | e6497e9b55c073be209ec673ef05e62bf57a2c8f /tracker-test | |
parent | 4701dd3b0c8323a11cf7d5ad09c579a9864a41bd (diff) | |
parent | c392181211b245e74292424500265323c960c1aa (diff) |
Merge branch 'unstable' into unstable
Diffstat (limited to 'tracker-test')
-rw-r--r-- | tracker-test/test.cpp | 6 | ||||
-rw-r--r-- | tracker-test/test.ui | 25 |
2 files changed, 27 insertions, 4 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())); } diff --git a/tracker-test/test.ui b/tracker-test/test.ui index 1141d584..556b19a3 100644 --- a/tracker-test/test.ui +++ b/tracker-test/test.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>184</width> - <height>39</height> + <width>278</width> + <height>58</height> </rect> </property> <property name="windowTitle"> @@ -28,9 +28,28 @@ </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> + <widget class="QLabel" name="label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Pressing "Abort" will immediately crash the application.</string> + </property> + </widget> + </item> + <item> <widget class="QDialogButtonBox" name="buttonBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + <set>QDialogButtonBox::Abort|QDialogButtonBox::Close</set> </property> </widget> </item> |