Skip to content

Commit 965c86f

Browse files
author
g_j_m
committed
Trim leading and trailing spaces from WMS settings when storing them.
I have often found that cutting/pasting WMS url's from webpages that I get extraneous spaces which then prevent wms from working. git-svn-id: http://svn.osgeo.org/qgis/trunk@5233 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b1bc184 commit 965c86f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gui/qgsnewhttpconnection.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ void QgsNewHttpConnection::saveConnection()
6767
QString baseKey = "/Qgis/connections-wms/";
6868

6969
baseKey += txtName->text();
70-
settings.writeEntry(baseKey + "/url", txtUrl->text());
71-
settings.writeEntry(baseKey + "/proxyhost", txtProxyHost->text());
72-
settings.writeEntry(baseKey + "/proxyport", txtProxyPort->text());
70+
settings.writeEntry(baseKey + "/url", txtUrl->text().trimmed());
71+
settings.writeEntry(baseKey + "/proxyhost", txtProxyHost->text().trimmed());
72+
settings.writeEntry(baseKey + "/proxyport", txtProxyPort->text().trimmed());
7373

7474
accept();
7575
}

0 commit comments

Comments
 (0)