Skip to content

Commit 879400d

Browse files
author
g_j_m
committed
Further changes to fix ticket #8 (wms not working through a web proxy). Should work now, but needs a bit of testing to be sure, which I'll do over the next few days.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5723 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 84c41eb commit 879400d

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/gui/qgisapp.cpp

+12-3
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,11 @@ void QgisApp::addWmsLayer()
19701970
wmss->selectedLayers(),
19711971
wmss->selectedStylesForSelectedLayers(),
19721972
wmss->selectedImageEncoding(),
1973-
wmss->selectedCrs()
1973+
wmss->selectedCrs(),
1974+
wmss->connProxyHost(),
1975+
wmss->connProxyPort(),
1976+
wmss->connProxyUser(),
1977+
wmss->connProxyPass()
19741978
);
19751979
}
19761980
}
@@ -4970,7 +4974,11 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath,
49704974
QStringList const & layers,
49714975
QStringList const & styles,
49724976
QString const & format,
4973-
QString const & crs)
4977+
QString const & crs,
4978+
QString const & proxyHost,
4979+
int proxyPort,
4980+
QString const & proxyUser,
4981+
QString const & proxyPassword)
49744982
{
49754983

49764984
#ifdef QGISDEBUG
@@ -5000,7 +5008,8 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath,
50005008
#endif
50015009

50025010
// TODO: Remove the 0 when the raster layer becomes a full provider gateway.
5003-
layer = new QgsRasterLayer(0, rasterLayerPath, baseName, providerKey, layers, styles, format, crs);
5011+
layer = new QgsRasterLayer(0, rasterLayerPath, baseName, providerKey, layers, styles, format, crs,
5012+
proxyHost, proxyPort, proxyUser, proxyPassword);
50045013

50055014
#ifdef QGISDEBUG
50065015
std::cout << "QgisApp::addRasterLayer: Constructed new layer." << std::endl;

src/gui/qgisapp.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ class QgisApp : public QMainWindow, public Ui::QgisAppBase
112112
QStringList const & layers,
113113
QStringList const & styles,
114114
QString const & format,
115-
QString const & crs);
115+
QString const & crs,
116+
QString const & proxyHost = QString(),
117+
int proxyPort = 80,
118+
QString const & proxyUser = QString(),
119+
QString const & proxyPassword = QString());
116120

117121
/** open a raster layer for the given file
118122
@returns false if unable to open a raster layer for rasterFile

0 commit comments

Comments
 (0)