Skip to content

Commit

Permalink
don't allow slashes in http connection names (fixes #9131)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 27, 2013
1 parent e1bce85 commit 30900e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsnewhttpconnection.cpp
Expand Up @@ -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 ):
Expand All @@ -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
Expand Down

0 comments on commit 30900e9

Please sign in to comment.