diff -r 5443e5e0faa3 -r e239378a9400 QTfrontend/ui/widget/selectWeapon.cpp --- a/QTfrontend/ui/widget/selectWeapon.cpp Thu Apr 25 21:25:16 2019 +0200 +++ b/QTfrontend/ui/widget/selectWeapon.cpp Thu Apr 25 23:01:05 2019 +0200 @@ -31,6 +31,9 @@ #include #include #include +#include +#include + #include QImage getAmmoImage(int num) @@ -205,6 +208,9 @@ //pLayout->setRowStretch(5, 100); m_name = new QLineEdit(this); + QRegExp rx(*cSafeFileNameRegExp); + QRegExpValidator* val = new QRegExpValidator(rx, m_name); + m_name->setValidator(val); pageLayout->addWidget(m_name, i, 0, 1, 5); }