Changeset 0ede0a2
- Timestamp:
- 10/05/17 17:59:45 (5 years ago)
- Branches:
- master
- Children:
- 68efead
- Parents:
- 8180111
- git-author:
- gregor herrmann <gregor@…> (10/05/17 13:27:04)
- git-committer:
- gregor herrmann <gregor@…> (10/05/17 17:59:45)
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/app/appsettings.cpp
r8180111 r0ede0a2 22 22 const QString PROXY_ADDRESS_SETTING ("proxyAddress"); 23 23 const QString PROXY_PORT_SETTING ("proxyPort"); 24 const QString PROXY_ISDIRECT_SETTING ("proxyIsDirectConnection"); 24 const QString PROXY_TYPE_SETTING ("proxyType"); 25 const QString PROXY_ISDIRECT_SETTING ("proxyIsDirectConnection"); 25 26 26 27 QSettings AppSettings::mSettings("Toastfreeware", "ConfClerk"); … … 34 35 { 35 36 return mSettings.value(PROXY_PORT_SETTING).toUInt(); 37 } 38 39 //QNetworkProxy::ProxyType 40 int AppSettings::proxyType() 41 { 42 return mSettings.value(PROXY_TYPE_SETTING).toInt(); 36 43 } 37 44 … … 51 58 } 52 59 60 // QNetworkProxy::ProxyType 61 void AppSettings::setProxyType(const int aType) 62 { 63 mSettings.setValue(PROXY_TYPE_SETTING, aType); 64 } 65 53 66 void AppSettings::setDirectConnection(bool aDirectConnection) 54 67 { -
src/app/appsettings.h
r8180111 r0ede0a2 24 24 #include <QString> 25 25 #include <QSettings> 26 #include <QNetworkProxy> 26 27 27 28 class AppSettings … … 36 37 static QString proxyAddress(); 37 38 static quint16 proxyPort(); 39 static int proxyType(); // QNetworkProxy::ProxyType 38 40 static bool isDirectConnection(); 39 41 40 42 static void setProxyAddress(const QString &aAddress); 41 43 static void setProxyPort(const quint16 aPort); 44 static void setProxyType(const int aProxyType); // QNetworkProxy::ProxyType 42 45 static void setDirectConnection(bool aDirectConnection); 43 46 static int preEventAlarmSec() {return 60*15;} ///< seconds that alarm should ring before an event starts -
src/gui/mainwindow.cpp
r8180111 r0ede0a2 83 83 84 84 QNetworkProxy proxy( 85 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,85 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : (QNetworkProxy::ProxyType)AppSettings::proxyType(), 86 86 AppSettings::proxyAddress(), 87 87 AppSettings::proxyPort(), … … 364 364 dialog.saveDialogData(); 365 365 QNetworkProxy proxy( 366 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,366 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : (QNetworkProxy::ProxyType)AppSettings::proxyType(), 367 367 AppSettings::proxyAddress(), 368 368 AppSettings::proxyPort(), -
src/gui/settingsdialog.cpp
r8180111 r0ede0a2 22 22 #include "appsettings.h" 23 23 #include <QDebug> 24 #include <QNetworkProxy> 24 25 25 26 SettingsDialog::SettingsDialog(QWidget *aParent) … … 46 47 AppSettings::setProxyAddress(address->text()); 47 48 AppSettings::setProxyPort(port->value()); 49 AppSettings::setProxyType(QNetworkProxy::HttpProxy); // TODO!! 48 50 AppSettings::setDirectConnection(directConnection->isChecked()); 49 51 }
Note: See TracChangeset
for help on using the changeset viewer.