summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-09 12:06:17 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-09 12:08:41 (GMT)
commit2fb73cc10e809322d0283759b4062f1c0417bd27 (patch)
treedbd89962eb265f7461d07dffa5b97be5afd40b7c
parent5b60ead22c05f8b32a3cb66abc89398cf538b8bd (diff)
USe new connect api
-rw-r--r--resources/tomboynotes/o2/o1.cpp4
-rw-r--r--resources/tomboynotes/o2/o1timedreply.cpp4
-rw-r--r--resources/tomboynotes/o2/o2reply.cpp2
-rw-r--r--resources/tomboynotes/o2/o2replyserver.cpp6
4 files changed, 8 insertions, 8 deletions
diff --git a/resources/tomboynotes/o2/o1.cpp b/resources/tomboynotes/o2/o1.cpp
index b049e90..3162472 100644
--- a/resources/tomboynotes/o2/o1.cpp
+++ b/resources/tomboynotes/o2/o1.cpp
@@ -256,7 +256,7 @@ void O1::link()
request.setHeader(QNetworkRequest::ContentTypeHeader, O2_MIME_TYPE_XFORM);
QNetworkReply *reply = manager_->post(request, QByteArray());
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onTokenRequestError(QNetworkReply::NetworkError)));
- connect(reply, SIGNAL(finished()), this, SLOT(onTokenRequestFinished()));
+ connect(reply, &QNetworkReply::finished, this, &O1::onTokenRequestFinished);
}
void O1::onTokenRequestError(QNetworkReply::NetworkError error)
@@ -341,7 +341,7 @@ void O1::exchangeToken()
request.setHeader(QNetworkRequest::ContentTypeHeader, O2_MIME_TYPE_XFORM);
QNetworkReply *reply = manager_->post(request, QByteArray());
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onTokenExchangeError(QNetworkReply::NetworkError)));
- connect(reply, SIGNAL(finished()), this, SLOT(onTokenExchangeFinished()));
+ connect(reply, &QNetworkReply::finished, this, &O1::onTokenExchangeFinished);
}
void O1::onTokenExchangeError(QNetworkReply::NetworkError error)
diff --git a/resources/tomboynotes/o2/o1timedreply.cpp b/resources/tomboynotes/o2/o1timedreply.cpp
index 4685be2..41dd495 100644
--- a/resources/tomboynotes/o2/o1timedreply.cpp
+++ b/resources/tomboynotes/o2/o1timedreply.cpp
@@ -7,8 +7,8 @@ O1TimedReply::O1TimedReply(QNetworkReply *parent, int pTimeout): QTimer(parent)
{
setSingleShot(true);
setInterval(pTimeout);
- connect(this, SIGNAL(timeout()), this, SLOT(onTimeout()));
- connect(parent, SIGNAL(finished()), this, SLOT(onFinished()));
+ connect(this, &QTimer::timeout, this, &O1TimedReply::onTimeout);
+ connect(parent, &QNetworkReply::finished, this, &O1TimedReply::onFinished);
}
void O1TimedReply::onFinished()
diff --git a/resources/tomboynotes/o2/o2reply.cpp b/resources/tomboynotes/o2/o2reply.cpp
index db8517a..835307d 100644
--- a/resources/tomboynotes/o2/o2reply.cpp
+++ b/resources/tomboynotes/o2/o2reply.cpp
@@ -7,7 +7,7 @@ O2Reply::O2Reply(QNetworkReply *r, int timeOut, QObject *parent): QTimer(parent)
{
setSingleShot(true);
connect(this, SIGNAL(error(QNetworkReply::NetworkError)), reply, SIGNAL(error(QNetworkReply::NetworkError)), Qt::QueuedConnection);
- connect(this, SIGNAL(timeout()), this, SLOT(onTimeOut()), Qt::QueuedConnection);
+ connect(this, &QTimer::timeout, this, &O2Reply::onTimeOut, Qt::QueuedConnection);
start(timeOut);
}
diff --git a/resources/tomboynotes/o2/o2replyserver.cpp b/resources/tomboynotes/o2/o2replyserver.cpp
index ce527ba..9a622e9 100644
--- a/resources/tomboynotes/o2/o2replyserver.cpp
+++ b/resources/tomboynotes/o2/o2replyserver.cpp
@@ -15,15 +15,15 @@
O2ReplyServer::O2ReplyServer(QObject *parent): QTcpServer(parent)
{
- connect(this, SIGNAL(newConnection()), this, SLOT(onIncomingConnection()));
+ connect(this, &QTcpServer::newConnection, this, &O2ReplyServer::onIncomingConnection);
replyContent_ = "<HTML></HTML>";
}
void O2ReplyServer::onIncomingConnection()
{
QTcpSocket *socket = nextPendingConnection();
- connect(socket, SIGNAL(readyRead()), this, SLOT(onBytesReady()), Qt::UniqueConnection);
- connect(socket, SIGNAL(disconnected()), socket, SLOT(deleteLater()));
+ connect(socket, &QIODevice::readyRead, this, &O2ReplyServer::onBytesReady, Qt::UniqueConnection);
+ connect(socket, &QAbstractSocket::disconnected, socket, &QObject::deleteLater);
}
void O2ReplyServer::onBytesReady()