From 30900e9b8960b1dbe13d08e903d17f77b3ef7bca Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Wed, 27 Nov 2013 15:31:23 +0100 Subject: [PATCH] don't allow slashes in http connection names (fixes #9131) --- src/gui/qgsnewhttpconnection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/qgsnewhttpconnection.cpp b/src/gui/qgsnewhttpconnection.cpp index 4162d92f0f28..809da712ed46 100644 --- a/src/gui/qgsnewhttpconnection.cpp +++ b/src/gui/qgsnewhttpconnection.cpp @@ -20,6 +20,7 @@ #include #include #include +#include QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, const QString& baseKey, const QString& connName, Qt::WFlags fl ): @@ -39,6 +40,8 @@ QgsNewHttpConnection::QgsNewHttpConnection( // using connection-wms and connection-wfs -> parse credential key fro it. mCredentialsBaseKey = mBaseKey.split( '-' ).last().toUpper(); + txtName->setValidator( new QRegExpValidator( QRegExp( "[^/]+" ), txtName ) ); + if ( !connName.isEmpty() ) { // populate the dialog with the information stored for the connection