summaryrefslogtreecommitdiffstats
path: root/examples/embedded/flightinfo
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@idiap.ch>2022-10-25 22:53:32 +0200
committerSamuel Gaist <samuel.gaist@idiap.ch>2022-12-21 21:52:17 +0100
commitc47e2aebb6a3d188fb2b16da4ae42804fc0df39f (patch)
treed08d39d10e827610b5c934854b770ddbbcc541f9 /examples/embedded/flightinfo
parentabe3bc1c432e670fc1244a643b720c1b6a2d56f6 (diff)
examples: port embedded examples to new connection style
Task-number: QTBUG-106893 Change-Id: I6d00c53b7747b36c5f0094e566713f13fe74f3de Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/embedded/flightinfo')
-rw-r--r--examples/embedded/flightinfo/flightinfo.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/embedded/flightinfo/flightinfo.cpp b/examples/embedded/flightinfo/flightinfo.cpp
index c4d81177e7..6a5eb55d99 100644
--- a/examples/embedded/flightinfo/flightinfo.cpp
+++ b/examples/embedded/flightinfo/flightinfo.cpp
@@ -71,8 +71,8 @@ public:
ui.searchBar->hide();
ui.infoBox->hide();
- connect(ui.searchButton, SIGNAL(clicked()), SLOT(startSearch()));
- connect(ui.flightEdit, SIGNAL(returnPressed()), SLOT(startSearch()));
+ connect(ui.searchButton, &QPushButton::clicked, this, &FlightInfo::startSearch);
+ connect(ui.flightEdit, &QLineEdit::returnPressed, this, &FlightInfo::startSearch);
setWindowTitle("Flight Info");
@@ -83,11 +83,11 @@ public:
QAction *searchTodayAction = new QAction("Today's Flight", this);
QAction *searchYesterdayAction = new QAction("Yesterday's Flight", this);
QAction *randomAction = new QAction("Random Flight", this);
- connect(searchTodayAction, SIGNAL(triggered()), SLOT(today()));
- connect(searchYesterdayAction, SIGNAL(triggered()), SLOT(yesterday()));
- connect(randomAction, SIGNAL(triggered()), SLOT(randomFlight()));
- connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleNetworkData(QNetworkReply*)));
+ connect(searchTodayAction, &QAction::triggered, this, &FlightInfo::today);
+ connect(searchYesterdayAction, &QAction::triggered, this, &FlightInfo::yesterday);
+ connect(randomAction, &QAction::triggered, this, &FlightInfo::randomFlight);
+ connect(&m_manager, &QNetworkAccessManager::finished,
+ this, &FlightInfo::handleNetworkData);
addAction(searchTodayAction);
addAction(searchYesterdayAction);
addAction(randomAction);