Skip to content
Permalink
Browse files
avoid slashes in connection names (followup 30900e9; fixes #16624)
  • Loading branch information
jef-n committed May 26, 2017
1 parent dc5ba8f commit 8c873b14b8a572aa7d65d31381357844c3d73aeb
@@ -15,6 +15,7 @@
* *
***************************************************************************/
#include <QMessageBox>
#include <QRegExpValidator>

#include "qgsnewogrconnection.h"
#include "qgscontexthelp.h"
@@ -62,6 +63,7 @@ QgsNewOgrConnection::QgsNewOgrConnection( QWidget *parent, const QString &connTy
}
cmbDatabaseTypes->setCurrentIndex( cmbDatabaseTypes->findText( connType ) );
txtName->setText( connName );
txtName->setValidator( new QRegExpValidator( QRegExp( "[^\\/]+" ), txtName ) );
txtName->setEnabled( false );
cmbDatabaseTypes->setEnabled( false );
}
@@ -19,6 +19,7 @@
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlError>
#include <QRegExpValidator>

#include "qgssettings.h"
#include "qgslogger.h"
@@ -72,6 +73,7 @@ QgsDb2NewConnection::QgsDb2NewConnection( QWidget *parent, const QString &connNa
}

txtName->setText( connName );
txtName->setValidator( new QRegExpValidator( QRegExp( "[^\\/]+" ), txtName ) );
}
}

@@ -19,6 +19,7 @@
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlError>
#include <QRegExpValidator>

#include "qgsmssqlnewconnection.h"
#include "qgsmssqlprovider.h"
@@ -62,6 +63,7 @@ QgsMssqlNewConnection::QgsMssqlNewConnection( QWidget *parent, const QString &co
}

txtName->setText( connName );
txtName->setValidator( new QRegExpValidator( QRegExp( "[^\\/]+" ), txtName ) );
}
on_cb_trustedConnection_clicked();
}
@@ -17,6 +17,7 @@

#include <QMessageBox>
#include <QInputDialog>
#include <QRegExpValidator>

#include "qgssettings.h"
#include "qgsoraclenewconnection.h"
@@ -79,6 +80,7 @@ QgsOracleNewConnection::QgsOracleNewConnection( QWidget *parent, const QString &
}

txtName->setText( connName );
txtName->setValidator( new QRegExpValidator( QRegExp( "[^\\/]+" ), txtName ) );
}
}
//! Autoconnected SLOTS *
@@ -17,6 +17,7 @@

#include <QMessageBox>
#include <QInputDialog>
#include <QRegExpValidator>

#include "qgspgnewconnection.h"
#include "qgsauthmanager.h"
@@ -100,8 +101,8 @@ QgsPgNewConnection::QgsPgNewConnection( QWidget *parent, const QString &connName
tabAuthentication->setCurrentIndex( tabAuthentication->indexOf( mAuthConfigSelect ) );
}


txtName->setText( connName );
txtName->setValidator( new QRegExpValidator( QRegExp( "[^\\/]+" ), txtName ) );
}
}
//! Autoconnected SLOTS *

0 comments on commit 8c873b1

Please sign in to comment.