Skip to content

Commit 30900e9

Browse files
committed
don't allow slashes in http connection names (fixes #9131)
1 parent e1bce85 commit 30900e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gui/qgsnewhttpconnection.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <QMessageBox>
2121
#include <QUrl>
2222
#include <QPushButton>
23+
#include <QRegExpValidator>
2324

2425
QgsNewHttpConnection::QgsNewHttpConnection(
2526
QWidget *parent, const QString& baseKey, const QString& connName, Qt::WFlags fl ):
@@ -39,6 +40,8 @@ QgsNewHttpConnection::QgsNewHttpConnection(
3940
// using connection-wms and connection-wfs -> parse credential key fro it.
4041
mCredentialsBaseKey = mBaseKey.split( '-' ).last().toUpper();
4142

43+
txtName->setValidator( new QRegExpValidator( QRegExp( "[^/]+" ), txtName ) );
44+
4245
if ( !connName.isEmpty() )
4346
{
4447
// populate the dialog with the information stored for the connection

0 commit comments

Comments
 (0)