diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-04-12 12:07:59 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-04-18 08:07:21 +0000 |
commit | 7c4111286b3c1f072a731ae9aa938c9e73b035e7 (patch) | |
tree | 58ada4886b9c6c28712585c49f5db350312eb57c | |
parent | 382aac3e7877c151eaef5f7bb3fedefc10a8f284 (diff) |
Don't mangle service names
We want to look the services up by their original name later.
Change-Id: I8a8061bccb064a779e50aefdc6cf348806b417cd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
-rw-r--r-- | tests/auto/compiled/tst_compiled.cpp | 11 | ||||
-rw-r--r-- | tools/qscxmlc/scxmlcppdumper.cpp | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/compiled/tst_compiled.cpp b/tests/auto/compiled/tst_compiled.cpp index ca9b7b3..49174e3 100644 --- a/tests/auto/compiled/tst_compiled.cpp +++ b/tests/auto/compiled/tst_compiled.cpp @@ -34,6 +34,7 @@ #include "ids1.h" #include "statemachineunicodename.h" #include "datainnulldatamodel.h" +#include "submachineunicodename.h" Q_DECLARE_METATYPE(QScxmlError); @@ -46,6 +47,7 @@ class tst_Compiled: public QObject private Q_SLOTS: void stateNames(); void nullDataInit(); + void subMachineUnicodeName(); }; void tst_Compiled::stateNames() @@ -89,6 +91,15 @@ void tst_Compiled::nullDataInit() QVERIFY(!nullData.init()); // raises an error, but doesn't crash } +void tst_Compiled::subMachineUnicodeName() +{ + Directions1 directions; + QVERIFY(directions.init()); + QVariant prop = directions.property("änywhere"); + QVERIFY(!prop.isNull()); + QVERIFY(prop.isValid()); +} + QTEST_MAIN(tst_Compiled) #include "tst_compiled.moc" diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 6e1d02c..c656376 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -1193,7 +1193,7 @@ private: knownQObjectClasses.insert(serviceClass, ""); reg.impl << QStringLiteral(" SET_SERVICE_PROP(%1, %2, %3%2, %4)") - .arg(addString(mangledServiceName)) + .arg(addString(serviceName)) .arg(mangledServiceName, namespacePrefix).arg(classDef.signalList.size()); const QByteArray mangledMachineName = mangledName(serviceName, MachineName).toUtf8(); @@ -1221,7 +1221,7 @@ private: ++classDef.notifyableProperties; PropertyDef prop; - prop.name = mangledServiceName.toUtf8(); + prop.name = serviceName.toUtf8(); prop.type = serviceClass + "*"; prop.read = "data->" + mangledMachineName; prop.notify = mangledSignalName; |