ScxmlEditor: Don't generate invalid state names

'(' and ')' should be avoided when copy/pasting states.

Change-Id: Ic54528ed51b2f4596651bb1d23f282e70210f3a7
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Ulf Hermann
2017-03-15 16:49:07 +01:00
parent 7236f2124a
commit 53a32f7fc6

View File

@@ -625,7 +625,7 @@ QString ScxmlDocument::getUniqueCopyId(const ScxmlTag *tag)
// Check duplicate
foreach (const ScxmlTag *t, m_tags) {
if (t->attribute("id") == name && t != tag) {
name = QString::fromLatin1("%1_Copy(%2)").arg(key).arg(counter);
name = QString::fromLatin1("%1_Copy%2").arg(key).arg(counter);
bFound = true;
counter++;
}