Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
restricted location/mapset names in GRASS new mapset dialog, fixes #4258
  • Loading branch information
blazek committed May 24, 2012
1 parent 429403d commit d4dcde0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/plugins/grass/qgsgrassnewmapset.cpp
Expand Up @@ -29,9 +29,11 @@
#include <QCloseEvent>
#include <QFileDialog>
#include <QMessageBox>
#include <QRegExp>
#include <QSettings>
#include <QTextStream>


extern "C"
{
#include <grass/gprojects.h>
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit d4dcde0

Please sign in to comment.