aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2013-02-15 21:48:46 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2013-02-15 21:48:46 +0000
commitfed0cc086ef62a79fbe5fb7f9d66d2853c09723f (patch)
treee53dd81e48ba5144290b8701db8f63361495cdbd
parentrestart app, if keydb is changed (diff)
downloadgpg4usb-fed0cc086ef62a79fbe5fb7f9d66d2853c09723f.tar.gz
gpg4usb-fed0cc086ef62a79fbe5fb7f9d66d2853c09723f.zip
really restart app, if changes in settingsdialog need this
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@1011 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--mainwindow.cpp4
-rw-r--r--mainwindow.h1
-rwxr-xr-xsettingsdialog.cpp4
-rwxr-xr-xsettingsdialog.h1
4 files changed, 5 insertions, 5 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index da0c575..daf9963 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1259,9 +1259,7 @@ void MainWindow::slotFileVerify()
void MainWindow::slotOpenSettingsDialog()
{
- SettingsDialog *settingsdialog = new SettingsDialog(mCtx, this);
-
- connect(settingsdialog, SIGNAL(signalRestartNeeded(bool)), this, SLOT(slotSetRestartNeeded(bool)));
+ settingsdialog = new SettingsDialog(mCtx, this);
// Iconsize
QSize iconSize = settings.value("toolbar/iconsize", QSize(32, 32)).toSize();
diff --git a/mainwindow.h b/mainwindow.h
index 3257849..63b7caf 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -433,6 +433,7 @@ private:
GpgME::GpgContext *mCtx; /**< TODO */
KeyMgmt *keyMgmt; /**< TODO */
KeyServerImportDialog *importDialog; /**< TODO */
+ SettingsDialog *settingsdialog; /**< TODO */
bool attachmentDockCreated;
bool restartNeeded;
};
diff --git a/settingsdialog.cpp b/settingsdialog.cpp
index a809075..637ba35 100755
--- a/settingsdialog.cpp
+++ b/settingsdialog.cpp
@@ -61,6 +61,8 @@ SettingsDialog::SettingsDialog(GpgME::GpgContext *ctx, QWidget *parent)
connect(gpgPathsTab, SIGNAL(signalRestartNeeded(bool)), this, SLOT(slotSetRestartNeeded(bool)));
connect(advancedTab, SIGNAL(signalRestartNeeded(bool)), this, SLOT(slotSetRestartNeeded(bool)));
+ connect(this, SIGNAL(signalRestartNeeded(bool)), parent, SLOT(slotSetRestartNeeded(bool)));
+
exec();
}
@@ -71,7 +73,6 @@ bool SettingsDialog::getRestartNeeded()
void SettingsDialog::slotSetRestartNeeded(bool needed)
{
- qDebug() << "slot restart needed (settingsdialog): " << needed;
this->restartNeeded = needed;
}
@@ -288,7 +289,6 @@ void GeneralTab::applySettings()
void GeneralTab::slotLanguageChanged()
{
- qDebug() << "slot language changed";
emit signalRestartNeeded(true);
}
diff --git a/settingsdialog.h b/settingsdialog.h
index 4d10665..a3e9f89 100755
--- a/settingsdialog.h
+++ b/settingsdialog.h
@@ -149,6 +149,7 @@ signals:
class AdvancedTab : public QWidget
{
Q_OBJECT
+
public:
AdvancedTab(QWidget *parent = 0);
void setSettings();