@@ -359,6 +359,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
359
359
, mSplash( splash )
360
360
, mPythonUtils( NULL )
361
361
, mNAM( NULL )
362
+ , mProxyFactory( NULL )
362
363
, mpTileScaleWidget( NULL )
363
364
#ifdef HAVE_QWT
364
365
, mpGpsWidget( NULL )
@@ -972,26 +973,12 @@ void QgisApp::createActions()
972
973
mActionAddPgLayer = new QAction ( getThemeIcon ( " mActionAddLayer.png" ), tr ( " Add PostGIS Layer..." ), this );
973
974
shortcuts->registerAction ( mActionAddPgLayer , tr ( " Ctrl+Shift+D" , " Add a PostGIS Layer" ) );
974
975
mActionAddPgLayer ->setStatusTip ( tr ( " Add a PostGIS Layer" ) );
975
- // #ifdef HAVE_POSTGRESQL
976
- // QgsDebugMsg("HAVE_POSTGRESQL is defined");
977
- // assert(0);
978
- // #else
979
- // QgsDebugMsg("HAVE_POSTGRESQL not defined");
980
- // assert(0);
981
- // #endif
982
976
connect ( mActionAddPgLayer , SIGNAL ( triggered () ), this , SLOT ( addDatabaseLayer () ) );
983
977
984
978
mActionAddSpatiaLiteLayer = new QAction ( getThemeIcon ( " mActionAddSpatiaLiteLayer.png" ), tr ( " Add SpatiaLite Layer..." ), this );
985
979
shortcuts->registerAction ( mActionAddSpatiaLiteLayer , tr ( " Ctrl+Shift+L" , " Add a SpatiaLite Layer" ) );
986
980
mActionAddSpatiaLiteLayer ->setStatusTip ( tr ( " Add a SpatiaLite Layer" ) );
987
981
connect ( mActionAddSpatiaLiteLayer , SIGNAL ( triggered () ), this , SLOT ( addSpatiaLiteLayer () ) );
988
- // #ifdef HAVE_SPATIALITE
989
- // QgsDebugMsg("HAVE_SPATIALITE is defined");
990
- // assert(0);
991
- // #else
992
- // QgsDebugMsg("HAVE_SPATIALITE not defined");
993
- // assert(0);
994
- // #endif
995
982
996
983
mActionAddWmsLayer = new QAction ( getThemeIcon ( " mActionAddWmsLayer.png" ), tr ( " Add WMS Layer..." ), this );
997
984
shortcuts->registerAction ( mActionAddWmsLayer , tr ( " Ctrl+Shift+W" , " Add a Web Mapping Server Layer" ) );
@@ -6724,7 +6711,13 @@ void QgisApp::namUpdate()
6724
6711
}
6725
6712
6726
6713
#if QT_VERSION >= 0x40500
6727
- mNAM ->setProxyFactory ( new QgsNetworkProxyFactory ( proxy, excludes ) );
6714
+ if ( !mProxyFactory )
6715
+ {
6716
+ mProxyFactory = new QgsNetworkProxyFactory ();
6717
+ mNAM ->setProxyFactory ( mProxyFactory );
6718
+ }
6719
+
6720
+ mProxyFactory ->setProxyAndExcludes ( proxy, excludes );
6728
6721
6729
6722
QNetworkDiskCache *cache = qobject_cast<QNetworkDiskCache*>( nam ()->cache () );
6730
6723
if ( !cache )
0 commit comments