--- a/QTfrontend/ui/page/pageeditteam.cpp Thu Apr 25 21:25:16 2019 +0200
+++ b/QTfrontend/ui/page/pageeditteam.cpp Thu Apr 25 23:01:05 2019 +0200
@@ -28,9 +28,12 @@
#include <QMessageBox>
#include <QStandardItemModel>
#include <QDebug>
+#include <QRegExp>
+#include <QRegExpValidator>
#include "SquareLabel.h"
#include "HWApplication.h"
#include "keybinder.h"
+#include "hwconsts.h"
#include "physfs.h"
#include "DataManager.h"
@@ -129,6 +132,9 @@
TeamNameEdit->setMaxLength(64);
TeamNameEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
TeamNameEdit->setStyleSheet("QLineEdit { padding: 6px; }");
+ QRegExp rx(*cSafeFileNameRegExp);
+ QRegExpValidator * val = new QRegExpValidator(rx, TeamNameEdit);
+ TeamNameEdit->setValidator(val);
GBTLayout->addWidget(TeamNameEdit, 0, 1, 1, 2);
vbox2->addWidget(GBoxTeam);