summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-12-01 13:00:23 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-12-03 12:00:03 +0000
commit5ff4c9091abd680f9448b01db6ebffcb09505b27 (patch)
tree2c410a45d8ae4af7c4c7e4eb99ff0d28e97e29f5 /tests
parent3a0ef372c00bdfd51f2a6b8306a48965f6faec7f (diff)
Change QScxmlEvent::{name,sendId} from QByteArray to QString.
Change-Id: I1da62c00865b955864df0326a247bafba6c763ff Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/scion/scion.pro1
-rw-r--r--tests/auto/scion/tst_scion.cpp10
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/scion/scion.pro b/tests/auto/scion/scion.pro
index 14e825f..6b4accf 100644
--- a/tests/auto/scion/scion.pro
+++ b/tests/auto/scion/scion.pro
@@ -6,6 +6,7 @@ TARGET = tst_scion
TEMPLATE = app
RESOURCES = $$OUT_PWD/scion.qrc
+DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
SOURCES += \
tst_scion.cpp
diff --git a/tests/auto/scion/tst_scion.cpp b/tests/auto/scion/tst_scion.cpp
index 40da0a6..30ada94 100644
--- a/tests/auto/scion/tst_scion.cpp
+++ b/tests/auto/scion/tst_scion.cpp
@@ -305,7 +305,7 @@ static bool playEvent(QScxmlStateMachine *stateMachine, const QJsonObject &event
Q_ASSERT(eventDescription.contains(QLatin1String("event")));
auto event = eventDescription.value(QLatin1String("event")).toObject();
- auto eventName = event.value(QLatin1String("name")).toString().toUtf8();
+ auto eventName = event.value(QLatin1String("name")).toString();
Q_ASSERT(!eventName.isEmpty());
QScxmlEvent::EventType type = QScxmlEvent::ExternalEvent;
if (event.contains(QLatin1String("type"))) {
@@ -324,18 +324,18 @@ static bool playEvent(QScxmlStateMachine *stateMachine, const QJsonObject &event
if (event.contains(QLatin1String("data"))) {
data = event.value(QLatin1String("data")).toVariant();
}
- QByteArray sendid;
+ QString sendid;
if (event.contains(QLatin1String("sendid")))
- sendid = event.value(QLatin1String("sendid")).toString().toUtf8();
+ sendid = event.value(QLatin1String("sendid")).toString();
QString origin;
if (event.contains(QLatin1String("origin")))
origin = event.value(QLatin1String("origin")).toString();
QString origintype;
if (event.contains(QLatin1String("origintype")))
origintype = event.value(QLatin1String("origintype")).toString();
- QByteArray invokeid;
+ QString invokeid;
if (event.contains(QLatin1String("invokeid")))
- invokeid = event.value(QLatin1String("invokeid")).toString().toUtf8();
+ invokeid = event.value(QLatin1String("invokeid")).toString();
QScxmlEvent *e = new QScxmlEvent;
e->setName(eventName);
e->setEventType(type);