diff --git a/mupen64plus-input-qt/configdialog.cpp b/mupen64plus-input-qt/configdialog.cpp index e00a00a..7950756 100644 --- a/mupen64plus-input-qt/configdialog.cpp +++ b/mupen64plus-input-qt/configdialog.cpp @@ -352,7 +352,11 @@ ProfileEditor::ProfileEditor(QString profile, QSettings *settings, QWidget *pare activeButton = nullptr; QString section = profile; + QRegExp rx("[a-zA-Z0-9]+"); + QValidator *validator = new QRegExpValidator(rx, this); QLineEdit *profileName = new QLineEdit(this); + profileName->setValidator(validator); + profileName->setMaxLength(30); if (profile == "Auto-Keyboard" || profile == "Auto-Gamepad") { profileName->setDisabled(0); profile = "";