From b83817e05e7f2dd9e519edb1f71be9c0ae7ca602 Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Sun, 16 Feb 2014 20:18:28 +0100 Subject: [PATCH] May only include alphanumeric characters and underscores and may not start with a number. --- apps/opencs/view/world/scriptedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/opencs/view/world/scriptedit.cpp b/apps/opencs/view/world/scriptedit.cpp index 5d80d29047..1e1bb0e2e3 100644 --- a/apps/opencs/view/world/scriptedit.cpp +++ b/apps/opencs/view/world/scriptedit.cpp @@ -83,6 +83,6 @@ bool CSVWorld::ScriptEdit::stringNeedsQuote (const std::string& id) { QString string(QString::fromStdString(id)); // is only for c++11, so let's use qregexp for now. //I'm not quite sure when do we need to put quotes. To be safe we will use quotes for anything other than… - QRegExp regexp("^[a-z]{1}[a-z|0-9]{0,}$", Qt::CaseInsensitive); + QRegExp regexp("^[a-z]{1}[a-z|0-9|_]{0,}$", Qt::CaseInsensitive); return !(string.contains(regexp)); }