From 60a4e627795bda1ffb85baa915e695ef1886b5f1 Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Thu, 29 Sep 2016 16:17:38 +0100 Subject: [PATCH] #5629 Enable activation cancellation dialog --- src/gui/src/ActivationDialog.cpp | 9 +++++++++ src/gui/src/ActivationDialog.h | 3 +++ src/gui/src/MainWindow.cpp | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/src/ActivationDialog.cpp b/src/gui/src/ActivationDialog.cpp index a08ac114..da7e934a 100644 --- a/src/gui/src/ActivationDialog.cpp +++ b/src/gui/src/ActivationDialog.cpp @@ -1,5 +1,6 @@ #include "ActivationDialog.h" #include "ui_ActivationDialog.h" +#include "CancelActivationDialog.h" ActivationDialog::ActivationDialog(QWidget *parent) : QDialog(parent), @@ -12,3 +13,11 @@ ActivationDialog::~ActivationDialog() { delete ui; } + +void ActivationDialog::reject() +{ + CancelActivationDialog cancelActivationDialog(this); + if (QDialog::Accepted == cancelActivationDialog.exec()) { + QDialog::reject(); + } +} diff --git a/src/gui/src/ActivationDialog.h b/src/gui/src/ActivationDialog.h index 52dbd4e0..396c4104 100644 --- a/src/gui/src/ActivationDialog.h +++ b/src/gui/src/ActivationDialog.h @@ -14,6 +14,9 @@ class ActivationDialog : public QDialog public: explicit ActivationDialog(QWidget *parent = 0); ~ActivationDialog(); + +public slots: + void reject(); private: Ui::ActivationDialog *ui; diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 966736e6..64f9f425 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -1154,7 +1154,7 @@ void MainWindow::on_m_pActionWizard_triggered() void MainWindow::on_m_pActivate_triggered() { - ActivationDialog activationDialog; + ActivationDialog activationDialog (this); activationDialog.exec(); }