Skip to content
Snippets Groups Projects
Commit da0a5912 authored by Provot Bertrand's avatar Provot Bertrand
Browse files

last translations + regex in filter editor

parent 35f84ebd
No related branches found
No related tags found
No related merge requests found
......@@ -160,9 +160,9 @@ void FilterEditor::nameChanged(QString name) {
void FilterEditor::save()
{
vector<Filter*> filters;
if(_name->text() == "")
if(!regex_match(_name->text().toStdString(),regex("[!-~]+")) || _name->text()=="")
{
QMessageBox msgBox(QMessageBox::Critical, tr("Error!"), tr("Your filter needs a name to be saved."));
QMessageBox msgBox(QMessageBox::Critical, tr("Error!"), tr("Your filter needs a valid name to be saved (no whitespace)."));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec();
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment