Changeset 47bfffb


Ignore:
Timestamp:
01/29/10 15:37:22 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
b0a3bc7
Parents:
6645e1f
Message:

if the application is run for first time, network connection is set to Direct connection

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/app/appsettings.cpp

    r6645e1f r47bfffb  
    66
    77QSettings AppSettings::mSettings("Ixonos", "FOSDEM");
    8 
    9 
    108
    119QString AppSettings::proxyAddress()
     
    3937}
    4038
     39bool AppSettings::contains(const QString &aKey)
     40{
     41    return mSettings.contains(aKey);
     42}
     43
  • src/app/appsettings.h

    r6645e1f r47bfffb  
    1313
    1414    public:
     15        static bool contains(const QString &aKey);
     16
    1517        static QString proxyAddress();
    1618        static quint16 proxyPort();
  • src/gui/mainwindow.cpp

    r6645e1f r47bfffb  
    3232    setupUi(this);
    3333
    34     qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort();
     34    // first time run aplication: -> let's have it direct connection in this case
     35    if(!AppSettings::contains("proxyIsDirectConnection"))
     36        AppSettings::setDirectConnection(true);
     37
     38    if(AppSettings::isDirectConnection())
     39    {
     40        qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort();
     41    }
    3542    QNetworkProxy proxy(
    3643            AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
Note: See TracChangeset for help on using the changeset viewer.