summaryrefslogtreecommitdiffstats
path: root/examples/scxml/pinball
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-07-07 15:41:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-07-13 13:45:10 +0000
commit7b94a6394ed744c1132a679ac699231b097f416d (patch)
tree4158eeafd17369f0e582ba6edf57dd60ec376967 /examples/scxml/pinball
parente971720ccd51781ad93c74db94c72817a7cd2068 (diff)
Provide Qt5-style syntax for connectToState
We should not force people to use the string-based connection syntax. Using modern C++ we can add more convenience here. Unfortunately we have to duplicate some code from QMetaObject, but this is worth it. Change-Id: I4daa1f7cfea9feb3de0159636a508ee64a849f55 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'examples/scxml/pinball')
-rw-r--r--examples/scxml/pinball/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/scxml/pinball/mainwindow.cpp b/examples/scxml/pinball/mainwindow.cpp
index f2887f0..9e525c2 100644
--- a/examples/scxml/pinball/mainwindow.cpp
+++ b/examples/scxml/pinball/mainwindow.cpp
@@ -124,7 +124,7 @@ MainWindow::~MainWindow()
void MainWindow::initAndConnect(const QString &state, QWidget *widget)
{
widget->setEnabled(m_machine->isActive(state));
- m_machine->connectToState(state, widget, SLOT(setEnabled(bool)));
+ m_machine->connectToState(state, widget, &QWidget::setEnabled);
}
void MainWindow::eventOccurred(const QScxmlEvent &event)