diff options
author | Jarek Kobus <jaroslaw.kobus@theqtcompany.com> | 2016-01-28 14:55:20 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@theqtcompany.com> | 2016-02-10 15:34:47 +0000 |
commit | 3c02e20707d77ca2562742711053b5a356ab36b6 (patch) | |
tree | 1091283aa1f1444a7f5e46ae0bd24c63dbceafac /examples | |
parent | 5ceb6ca26f17a630367610f982edb46d99437623 (diff) |
Rename connect -> connectToState, remove "signal" argument.
Change-Id: I79f4e2f91eabfbf224d4b6acd4c78b77fd80b577
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pinball/mainwindow.cpp | 3 | ||||
-rw-r--r-- | examples/trafficlight-common/trafficlight.cpp | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/examples/pinball/mainwindow.cpp b/examples/pinball/mainwindow.cpp index f4d1383..424a786 100644 --- a/examples/pinball/mainwindow.cpp +++ b/examples/pinball/mainwindow.cpp @@ -124,8 +124,7 @@ MainWindow::~MainWindow() void MainWindow::initAndConnect(const QString &state, QWidget *widget) { widget->setEnabled(m_machine->isActive(state)); - m_machine->connect(state, SIGNAL(activeChanged(bool)), - widget, SLOT(setEnabled(bool))); + m_machine->connectToState(state, widget, SLOT(setEnabled(bool))); } void MainWindow::updateScore(const QVariant &data) diff --git a/examples/trafficlight-common/trafficlight.cpp b/examples/trafficlight-common/trafficlight.cpp index 5e62e03..7341c96 100644 --- a/examples/trafficlight-common/trafficlight.cpp +++ b/examples/trafficlight-common/trafficlight.cpp @@ -101,15 +101,15 @@ TrafficLight::TrafficLight(QScxmlStateMachine *machine, QWidget *parent) Q_ASSERT(machine->init()); - machine->connect(QStringLiteral("red"), SIGNAL(activeChanged(bool)), + machine->connectToState(QStringLiteral("red"), widget->redLight(), SLOT(switchLight(bool))); - machine->connect(QStringLiteral("redGoingGreen"), SIGNAL(activeChanged(bool)), + machine->connectToState(QStringLiteral("redGoingGreen"), widget->redLight(), SLOT(switchLight(bool))); - machine->connect(QStringLiteral("yellow"), SIGNAL(activeChanged(bool)), + machine->connectToState(QStringLiteral("yellow"), widget->yellowLight(), SLOT(switchLight(bool))); - machine->connect(QStringLiteral("blinking"), SIGNAL(activeChanged(bool)), + machine->connectToState(QStringLiteral("blinking"), widget->yellowLight(), SLOT(switchLight(bool))); - machine->connect(QStringLiteral("green"), SIGNAL(activeChanged(bool)), + machine->connectToState(QStringLiteral("green"), widget->greenLight(), SLOT(switchLight(bool))); } |