QStateMachine: Don't scream at the user
Change-Id: I171606d10985bc7338b0f24ceb142fc0d88e7932 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
parent
4158de330d
commit
c46eec096f
@ -1498,7 +1498,7 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
|
||||
case QStateMachine::StateMachineChildModeSetToParallelError:
|
||||
Q_ASSERT(currentContext != nullptr);
|
||||
|
||||
errorString = QStateMachine::tr("Child mode of state machine '%1' is not 'ExclusiveStates'!")
|
||||
errorString = QStateMachine::tr("Child mode of state machine '%1' is not 'ExclusiveStates'.")
|
||||
.arg(currentContext->objectName());
|
||||
break;
|
||||
|
||||
@ -2469,7 +2469,7 @@ QStateMachine::QStateMachine(QObject *parent)
|
||||
and \a parent.
|
||||
|
||||
\warning Do not set the \a childMode to anything else than \l{ExclusiveStates}, otherwise the
|
||||
state machine is invalid, and might work incorrectly!
|
||||
state machine is invalid, and might work incorrectly.
|
||||
*/
|
||||
QStateMachine::QStateMachine(QState::ChildMode childMode, QObject *parent)
|
||||
: QState(*new QStateMachinePrivate, /*parentState=*/0)
|
||||
|
@ -338,7 +338,7 @@ void tst_QStateMachine::transitionToRootState()
|
||||
machine.postEvent(new QEvent(QEvent::User));
|
||||
QTest::ignoreMessage(QtWarningMsg,
|
||||
"Unrecoverable error detected in running state machine: "
|
||||
"Child mode of state machine 'machine' is not 'ExclusiveStates'!");
|
||||
"Child mode of state machine 'machine' is not 'ExclusiveStates'.");
|
||||
QCoreApplication::processEvents();
|
||||
QVERIFY(machine.configuration().isEmpty());
|
||||
QVERIFY(!machine.isRunning());
|
||||
@ -1064,7 +1064,7 @@ void tst_QStateMachine::transitionToStateNotInGraph()
|
||||
|
||||
machine.start();
|
||||
QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: "
|
||||
"Child mode of state machine '' is not 'ExclusiveStates'!");
|
||||
"Child mode of state machine '' is not 'ExclusiveStates'.");
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
QCOMPARE(machine.isRunning(), false);
|
||||
@ -2103,7 +2103,7 @@ void tst_QStateMachine::parallelRootState()
|
||||
QVERIFY(finishedSpy.isValid());
|
||||
machine.start();
|
||||
QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: "
|
||||
"Child mode of state machine '' is not 'ExclusiveStates'!");
|
||||
"Child mode of state machine '' is not 'ExclusiveStates'.");
|
||||
QTRY_COMPARE(startedSpy.count(), 1);
|
||||
QCOMPARE(machine.configuration().size(), 4);
|
||||
QVERIFY(machine.configuration().contains(s1));
|
||||
@ -3316,7 +3316,7 @@ void tst_QStateMachine::targetStateWithNoParent()
|
||||
|
||||
machine.start();
|
||||
QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: "
|
||||
"Child mode of state machine '' is not 'ExclusiveStates'!");
|
||||
"Child mode of state machine '' is not 'ExclusiveStates'.");
|
||||
TEST_ACTIVE_CHANGED(s1, 2);
|
||||
QTRY_COMPARE(startedSpy.count(), 1);
|
||||
QCOMPARE(machine.isRunning(), false);
|
||||
|
Loading…
Reference in New Issue
Block a user