summaryrefslogtreecommitdiffstats
path: root/examples/network/threadedfortuneserver
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2020-01-22 13:47:08 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-01-24 13:17:33 +0100
commit502d3d6744913899da87acfda5ebdab42c40329e (patch)
tree16658a328503bfd5a62b4fd5d69ffb66e9854b18 /examples/network/threadedfortuneserver
parentd1be8b9ceb2c7b20bbe53a07154c79699540ea3d (diff)
parent06bb315beb6c2c398223cfe52cbc7f66e14a8557 (diff)
Merge remote-tracking branch 'origin/dev' into merge-dev
Diffstat (limited to 'examples/network/threadedfortuneserver')
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp2
-rw-r--r--examples/network/threadedfortuneserver/dialog.h2
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.cpp2
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.h2
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/examples/network/threadedfortuneserver/dialog.cpp b/examples/network/threadedfortuneserver/dialog.cpp
index fcd6655ab9..e5b389f1e6 100644
--- a/examples/network/threadedfortuneserver/dialog.cpp
+++ b/examples/network/threadedfortuneserver/dialog.cpp
@@ -89,7 +89,7 @@ Dialog::Dialog(QWidget *parent)
"Run the Fortune Client example now.")
.arg(ipAddress).arg(server.serverPort()));
- connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(quitButton, &QPushButton::clicked, this, &Dialog::close);
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch(1);
diff --git a/examples/network/threadedfortuneserver/dialog.h b/examples/network/threadedfortuneserver/dialog.h
index d127b8bfc2..2898c5311c 100644
--- a/examples/network/threadedfortuneserver/dialog.h
+++ b/examples/network/threadedfortuneserver/dialog.h
@@ -64,7 +64,7 @@ class Dialog : public QWidget
Q_OBJECT
public:
- Dialog(QWidget *parent = 0);
+ Dialog(QWidget *parent = nullptr);
private:
QLabel *statusLabel;
diff --git a/examples/network/threadedfortuneserver/fortuneserver.cpp b/examples/network/threadedfortuneserver/fortuneserver.cpp
index 791ffc71f4..73d7e22531 100644
--- a/examples/network/threadedfortuneserver/fortuneserver.cpp
+++ b/examples/network/threadedfortuneserver/fortuneserver.cpp
@@ -74,7 +74,7 @@ void FortuneServer::incomingConnection(qintptr socketDescriptor)
{
QString fortune = fortunes.at(QRandomGenerator::global()->bounded(fortunes.size()));
FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this);
- connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
+ connect(thread, &FortuneThread::finished, thread, &FortuneThread::deleteLater);
thread->start();
}
//! [1]
diff --git a/examples/network/threadedfortuneserver/fortuneserver.h b/examples/network/threadedfortuneserver/fortuneserver.h
index dc0949bcb2..26ea3d1cbb 100644
--- a/examples/network/threadedfortuneserver/fortuneserver.h
+++ b/examples/network/threadedfortuneserver/fortuneserver.h
@@ -60,7 +60,7 @@ class FortuneServer : public QTcpServer
Q_OBJECT
public:
- FortuneServer(QObject *parent = 0);
+ FortuneServer(QObject *parent = nullptr);
protected:
void incomingConnection(qintptr socketDescriptor) override;
diff --git a/examples/network/threadedfortuneserver/fortunethread.cpp b/examples/network/threadedfortuneserver/fortunethread.cpp
index ddde5121a3..2e730c6c8f 100644
--- a/examples/network/threadedfortuneserver/fortunethread.cpp
+++ b/examples/network/threadedfortuneserver/fortunethread.cpp
@@ -65,7 +65,7 @@ void FortuneThread::run()
QTcpSocket tcpSocket;
//! [1] //! [2]
if (!tcpSocket.setSocketDescriptor(socketDescriptor)) {
- emit error(tcpSocket.error());
+ emit error(tcpSocket.socketError());
return;
}
//! [2] //! [3]