diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-09-20 17:48:45 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-09-22 10:17:52 +0000 |
commit | 045bcaa2bbae646ad2fc723e8386254214574d1e (patch) | |
tree | d85083b7f584dc8b1a5acf5afbd4bf4585cb9db8 /tests | |
parent | cb218f01a17965feec51de2adafcce5c895d4826 (diff) |
Simplify QScxmlParser
There is little point in exposing the intermediate steps of parsing,
instantiating the state machine, and instantiating the data model to
the user. One method to do all of this is enough and relieves us from
the burden of maintaining binary compatibility for multiple poorly
named extra methods.
Also, drop addError(). Who wants to add errors to the parser from the
outside?
Change-Id: I4a2faba8c5f130e8a95675ebbdb747df7afdee73
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/scion/tst_scion.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/auto/scion/tst_scion.cpp b/tests/auto/scion/tst_scion.cpp index c943281..1adf0b7 100644 --- a/tests/auto/scion/tst_scion.cpp +++ b/tests/auto/scion/tst_scion.cpp @@ -205,15 +205,12 @@ void TestScion::dynamic() parser.setFileName(scxml); DynamicLoader loader; parser.setLoader(&loader); - parser.parse(); + QScopedPointer<QScxmlStateMachine> stateMachine(parser.parse()); QVERIFY(parser.errors().isEmpty()); scxmlFile.close(); - QScopedPointer<QScxmlStateMachine> stateMachine(parser.instantiateStateMachine()); QVERIFY(stateMachine != Q_NULLPTR); - stateMachine->setLoader(&loader); - parser.instantiateDataModel(stateMachine.data()); const bool runResult = runTest(stateMachine.data(), testDescription.object()); if (runResult == false && testStatus == TestFailsOnRun) |