]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.cpp
implemented 'proxy settings' dialog
[toast/confclerk.git] / src / gui / mainwindow.cpp
index 71440dbe77453570ff80ae7e98f2991db5985525..15f507148a7e5a152f8bcf3fb3ad09d43b17fe87 100644 (file)
 #include "mapwindow.h"
 
 #include <tabcontainer.h>
+#include <appsettings.h>
 
-const QString PROXY_URL("192.168.0.252");
-const quint16 PROXY_PORT = 4040;
 const QString PROXY_USERNAME;
 const QString PROXY_PASSWD;
-const bool DIRECT_CONNECTION = false;
 
 MainWindow::MainWindow(int aEventId, QWidget *aParent)
     : QMainWindow(aParent)
 {
     setupUi(this);
 
-    qDebug() << "Setting-up proxy: " << PROXY_URL << ":" << PROXY_PORT;
-    QNetworkProxy proxy(DIRECT_CONNECTION ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
-            PROXY_URL, PROXY_PORT, PROXY_USERNAME, PROXY_PASSWD);
+    qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort();
+    QNetworkProxy proxy(
+            AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
+            AppSettings::proxyAddress(),
+            AppSettings::proxyPort(),
+            PROXY_USERNAME,
+            PROXY_PASSWD);
     QNetworkProxy::setApplicationProxy(proxy);
 
     int confId = Conference::activeConference();