]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.cpp
The cancel button on the settings dialog works now (ticket #14) and the layout of...
[toast/confclerk.git] / src / gui / mainwindow.cpp
index e006e8008dcc846469965aadf6fd58275f30533a..1e612dac22fc346c9607b560f54f057dbbdc4c74 100644 (file)
@@ -221,15 +221,17 @@ void MainWindow::unsetConference()
 void MainWindow::setup()
 {
     SettingsDialog dialog;
-    dialog.exec();
-
-    QNetworkProxy proxy(
-            AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
-            AppSettings::proxyAddress(),
-            AppSettings::proxyPort(),
-            PROXY_USERNAME,
-            PROXY_PASSWD);
-    QNetworkProxy::setApplicationProxy(proxy);
+    dialog.loadDialogData();
+    if (dialog.exec() == QDialog::Accepted) {
+        dialog.saveDialogData();
+        QNetworkProxy proxy(
+                AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
+                AppSettings::proxyAddress(),
+                AppSettings::proxyPort(),
+                PROXY_USERNAME,
+                PROXY_PASSWD);
+        QNetworkProxy::setApplicationProxy(proxy);
+    }
 }
 
 /** Create and run ConferenceEditor dialog, making required connections for it.