mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-11 06:40:34 +00:00
allow _foo ids without qoute
This commit is contained in:
parent
b83817e05e
commit
e1a0f60041
@ -83,6 +83,6 @@ bool CSVWorld::ScriptEdit::stringNeedsQuote (const std::string& id)
|
|||||||
{
|
{
|
||||||
QString string(QString::fromStdString(id)); //<regex> is only for c++11, so let's use qregexp for now.
|
QString string(QString::fromStdString(id)); //<regex> 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…
|
//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));
|
return !(string.contains(regexp));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user