Skip to content

Commit df895f1

Browse files
author
mhugent
committed
Improved port handling for wfs
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6952 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a1b7d7f commit df895f1

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/providers/wfs/qgswfsdata.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ int QgsWFSData::getWFSData()
5252

5353
//separate host from query string
5454
QUrl requestUrl(mUri);
55-
mHttp.setHost(requestUrl.host(), requestUrl.port());
55+
int portNr = requestUrl.port();
56+
if(portNr != -1)
57+
{
58+
mHttp.setHost(requestUrl.host(), portNr);
59+
}
60+
else
61+
{
62+
mHttp.setHost(requestUrl.host());
63+
}
5664
mHttp.get(mUri);
5765

58-
//just for a test
59-
//QProgressDialog pd;
60-
//pd.setWindowModality(Qt::WindowModal);
61-
//pd.setMaximum(150000000); //shows busy indocator
62-
//QObject::connect(&mHttp, SIGNAL(dataReadProgress(int,int)), &pd, SLOT(setValue(int)));
63-
//pd.show();
64-
6566
//loop to read the data
6667
QByteArray readData;
6768
int atEnd = 0;

0 commit comments

Comments
 (0)