Skip to content
Permalink
Browse files
don't allow slashes in http connection names (fixes #9131)
  • Loading branch information
jef-n committed Nov 27, 2013
1 parent e1bce85 commit 30900e9b8960b1dbe13d08e903d17f77b3ef7bca
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/qgsnewhttpconnection.cpp
@@ -20,6 +20,7 @@
#include <QMessageBox>
#include <QUrl>
#include <QPushButton>
#include <QRegExpValidator>

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

0 comments on commit 30900e9

Please sign in to comment.