Changeset 4bf83ee for src/app


Ignore:
Timestamp:
10/06/17 21:34:23 (5 years ago)
Author:
gregor herrmann <gregor@…>
Branches:
master
Children:
f940bd5
Parents:
e618f18
Message:

Settings (dialog): add username/password options for proxy server

Cf. #59

Location:
src/app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/app/appsettings.cpp

    re618f18 r4bf83ee  
    2323const QString PROXY_PORT_SETTING ("proxyPort");
    2424const QString PROXY_TYPE_SETTING ("proxyType");
     25const QString PROXY_USERNAME_SETTING ("proxyUsername");
     26const QString PROXY_PASSWORD_SETTING ("proxyPassword");
    2527const QString PROXY_ISDIRECT_SETTING ("proxyIsDirectConnection");
    2628
     
    4547}
    4648
     49QString AppSettings::proxyUsername()
     50{
     51    return mSettings.value(PROXY_USERNAME_SETTING).toString();
     52}
     53
     54QString AppSettings::proxyPassword()
     55{
     56    return mSettings.value(PROXY_PASSWORD_SETTING).toString();
     57}
     58
    4759bool AppSettings::isDirectConnection()
    4860{
     
    6577}
    6678
     79void AppSettings::setProxyUsername(const QString &aUsername)
     80{
     81    mSettings.setValue(PROXY_USERNAME_SETTING, aUsername);
     82}
     83
     84void AppSettings::setProxyPassword(const QString &aPassword)
     85{
     86    mSettings.setValue(PROXY_PASSWORD_SETTING, aPassword);
     87}
     88
    6789void AppSettings::setDirectConnection(bool aDirectConnection)
    6890{
  • src/app/appsettings.h

    re618f18 r4bf83ee  
    3838        static quint16 proxyPort();
    3939        static QNetworkProxy::ProxyType proxyType();
     40        static QString proxyUsername();
     41        static QString proxyPassword();
    4042        static bool isDirectConnection();
    4143
     
    4345        static void setProxyPort(const quint16 aPort);
    4446        static void setProxyType(QNetworkProxy::ProxyType aProxyType);
     47        static void setProxyUsername(const QString &aUsername);
     48        static void setProxyPassword(const QString &aPassword);
    4549        static void setDirectConnection(bool aDirectConnection);
    4650        static int preEventAlarmSec() {return 60*15;} ///< seconds that alarm should ring before an event starts
Note: See TracChangeset for help on using the changeset viewer.