Skip to content
Permalink
Browse files

restricted location/mapset names in GRASS new mapset dialog, fixes #4258

  • Loading branch information
blazek committed May 24, 2012
1 parent 429403d commit d4dcde0c94390887bb5b5e80415cd40135d477a6
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/plugins/grass/qgsgrassnewmapset.cpp
@@ -29,9 +29,11 @@
#include <QCloseEvent>
#include <QFileDialog>
#include <QMessageBox>
#include <QRegExp>
#include <QSettings>
#include <QTextStream>


extern "C"
{
#include <grass/gprojects.h>
@@ -134,10 +136,16 @@ QgsGrassNewMapset::QgsGrassNewMapset( QgisInterface *iface,
m = new QTreeWidgetItem( l, QStringList() << "Cimrman" << tr( "User's mapset" ) );
m->setExpanded( true );

// LOCATION
QRegExp rx;
rx.setPattern( "[A-Za-z0-9_.]+" );
mLocationLineEdit->setValidator( new QRegExpValidator( rx, mLocationLineEdit ) );

// CRS

// MAPSET
mMapsetsListView->clear();
mMapsetLineEdit->setValidator( new QRegExpValidator( rx, mMapsetLineEdit ) );

// FINISH

0 comments on commit d4dcde0

Please sign in to comment.
You can’t perform that action at this time.