From b9d14d4165d9595e0e669af33a840d700ed4e8f0 Mon Sep 17 00:00:00 2001 From: ubbo Date: Sun, 15 Jan 2012 18:04:42 +0000 Subject: restart app after loading old qgq4usb config git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@742 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- gpgconstants.h | 2 ++ main.cpp | 1 + mainwindow.h | 2 -- wizard.cpp | 4 ++-- wizard.h | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gpgconstants.h b/gpgconstants.h index 4b1df2f..e01083c 100644 --- a/gpgconstants.h +++ b/gpgconstants.h @@ -24,6 +24,8 @@ class QString; +const int RESTART_CODE = 1000; + class GpgConstants { public: diff --git a/main.cpp b/main.cpp index d170967..c2380d3 100644 --- a/main.cpp +++ b/main.cpp @@ -21,6 +21,7 @@ #include #include "mainwindow.h" +#include "gpgconstants.h" int main(int argc, char *argv[]) { diff --git a/mainwindow.h b/mainwindow.h index 5c972e3..bd4ef5f 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -56,8 +56,6 @@ class QApplication; class QDockWidget; QT_END_NAMESPACE -const int RESTART_CODE = 1000; - /** * @brief * diff --git a/wizard.cpp b/wizard.cpp index cf1a47b..aa157e3 100644 --- a/wizard.cpp +++ b/wizard.cpp @@ -20,7 +20,7 @@ #include - #include "wizard.h" +#include "wizard.h" Wizard::Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent) : QWizard(parent) @@ -217,7 +217,7 @@ bool ImportPage::importKeysFromGpg4usb() mKeyMgmt->importKeys(inBuffer); } - qApp->exit(); + qApp->exit(RESTART_CODE); return true; } diff --git a/wizard.h b/wizard.h index e451a28..0404c48 100644 --- a/wizard.h +++ b/wizard.h @@ -26,6 +26,7 @@ #include #include "keygendialog.h" #include "keymgmt.h" +#include "gpgconstants.h" class QCheckBox; class QLabel; -- cgit v1.2.3