Commit b4eda22e authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Make umbrello xmi id's XMI standard conform.

Add prefix 'u' to generated xmi id's and convert spaces in id's
into '_' for root folder names.
parent 9676daf8
......@@ -149,7 +149,9 @@ void UMLDoc::init()
};
for (int i = 0; i < Uml::ModelType::N_MODELTYPES; ++i) {
const QString rootName = QString::fromLatin1(nativeRootName[i]);
m_root[i] = new UMLFolder(rootName, Uml::ID::fromString(rootName));
QString id = rootName;
id.replace(QLatin1Char(' '), QLatin1Char('_'));
m_root[i] = new UMLFolder(rootName, Uml::ID::fromString(id));
m_root[i]->setLocalName(localizedRootName[i]);
}
createDatatypeFolder();
......
......@@ -25,7 +25,7 @@ Uml::ID::Type m_uniqueID;
*/
Uml::ID::Type gen()
{
m_uniqueID = std::string(KRandom::randomString(12).toLatin1());
m_uniqueID = std::string('u' + KRandom::randomString(12).toLatin1());
return m_uniqueID;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment