Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8231dbf6 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 9cdf9ed0
......@@ -24,7 +24,7 @@ O1::O1(QObject *parent): O0BaseAuth(parent)
manager_ = new QNetworkAccessManager(this);
replyServer_ = new O2ReplyServer(this);
qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
connect(replyServer_, SIGNAL(verificationReceived(QMap<QString,QString>)), this, SLOT(onVerificationReceived(QMap<QString,QString>)));
connect(replyServer_, &O2ReplyServer::verificationReceived, this, &O1::onVerificationReceived);
setCallbackUrl(O2_CALLBACK_URL);
}
......
......@@ -45,7 +45,7 @@ int O2Requestor::post(const QNetworkRequest &req, const QByteArray &data)
timedReplies_.add(reply_);
connect(reply_, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onRequestError(QNetworkReply::NetworkError)), Qt::QueuedConnection);
connect(reply_, SIGNAL(finished()), this, SLOT(onRequestFinished()), Qt::QueuedConnection);
connect(reply_, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(onUploadProgress(qint64,qint64)));
connect(reply_, &QNetworkReply::uploadProgress, this, &O2Requestor::onUploadProgress);
return id_;
}
......@@ -58,8 +58,8 @@ int O2Requestor::put(const QNetworkRequest &req, const QByteArray &data)
reply_ = manager_->put(request_, data_);
timedReplies_.add(reply_);
connect(reply_, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onRequestError(QNetworkReply::NetworkError)), Qt::QueuedConnection);
connect(reply_, SIGNAL(finished()), this, SLOT(onRequestFinished()), Qt::QueuedConnection);
connect(reply_, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(onUploadProgress(qint64,qint64)));
connect(reply_, &QNetworkReply::finished, this, &O2Requestor::onRequestFinished, Qt::QueuedConnection);
connect(reply_, &QNetworkReply::uploadProgress, this, &O2Requestor::onUploadProgress);
return id_;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment