summaryrefslogtreecommitdiffstats
path: root/examples/xml
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@idiap.ch>2022-11-23 23:08:37 +0100
committerSamuel Gaist <samuel.gaist@idiap.ch>2022-12-21 22:33:02 +0100
commit253a4a146b9e13b0e57adb793bb4ac78b1bad2ab (patch)
treed591a3aa579aec983716f8b55359a55b63e03b89 /examples/xml
parente686a13b7b2e37924e8d2a08187a538cf56a0ff3 (diff)
examples: port xml examples to new connection style
Task-number: QTBUG-106893 Change-Id: I1cab8949700d7449f0615731c85a77bb9136b0d3 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/xml')
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp
index 5ce9698b33..9269be4080 100644
--- a/examples/xml/rsslisting/rsslisting.cpp
+++ b/examples/xml/rsslisting/rsslisting.cpp
@@ -44,18 +44,18 @@ RSSListing::RSSListing(QWidget *parent)
fetchButton = new QPushButton(tr("Fetch"), this);
treeWidget = new QTreeWidget(this);
- connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
- this, SLOT(itemActivated(QTreeWidgetItem*)));
+ connect(treeWidget, &QTreeWidget::itemActivated,
+ this, &RSSListing::itemActivated);
QStringList headerLabels;
headerLabels << tr("Title") << tr("Link");
treeWidget->setHeaderLabels(headerLabels);
treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
- connect(&manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(finished(QNetworkReply*)));
+ connect(&manager, &QNetworkAccessManager::finished,
+ this, &RSSListing::finished);
- connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch()));
- connect(fetchButton, SIGNAL(clicked()), this, SLOT(fetch()));
+ connect(lineEdit, &QLineEdit::returnPressed, this, &RSSListing::fetch);
+ connect(fetchButton, &QPushButton::clicked, this, &RSSListing::fetch);
QVBoxLayout *layout = new QVBoxLayout(this);
@@ -82,9 +82,9 @@ void RSSListing::get(const QUrl &url)
currentReply->deleteLater();
}
currentReply = manager.get(request);
- connect(currentReply, SIGNAL(readyRead()), this, SLOT(readyRead()));
- connect(currentReply, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged()));
- connect(currentReply, SIGNAL(errorOccurred(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError)));
+ connect(currentReply, &QNetworkReply::readyRead, this, &RSSListing::readyRead);
+ connect(currentReply, &QNetworkReply::metaDataChanged, this, &RSSListing::metaDataChanged);
+ connect(currentReply, &QNetworkReply::errorOccurred, this, &RSSListing::error);
}
/*