Commit fd06fa3b authored by Laurent Montel's avatar Laurent Montel 😁

Fix some clazy warning

parent 3af8e38b
......@@ -80,7 +80,7 @@ protected:
* reply via getResponse. Similar rules apply. If no buffer is
* specified, no data is passed back.
*/
Resp command(const QByteArray &buf, char *r_buf = 0, unsigned int r_len = 0);
Resp command(const QByteArray &buf, char *r_buf = nullptr, unsigned int r_len = 0);
/**
* All POP3 commands will generate a response. Each response will
......
......@@ -1323,9 +1323,9 @@ void EwsResource::setUpAuth()
EwsAbstractAuth *auth = mSettings->loadAuth(this);
/* Use queued connections here to avoid stack overflow when the reauthentication proceeds through all stages. */
connect(auth, SIGNAL(authSucceeded()), this, SLOT(authSucceeded()), Qt::QueuedConnection);
connect(auth, SIGNAL(authFailed(QString)), this, SLOT(authFailed(QString)), Qt::QueuedConnection);
connect(auth, SIGNAL(requestAuthFailed()), this, SLOT(requestAuthFailed()), Qt::QueuedConnection);
connect(auth, &EwsAbstractAuth::authSucceeded, this, &EwsResource::authSucceeded, Qt::QueuedConnection);
connect(auth, &EwsAbstractAuth::authFailed, this, &EwsResource::authFailed, Qt::QueuedConnection);
connect(auth, &EwsAbstractAuth::requestAuthFailed, this, &EwsResource::requestAuthFailed, Qt::QueuedConnection);
qCDebugNC(EWSRES_LOG) << QStringLiteral("Initializing authentication");
......
......@@ -306,7 +306,7 @@ std::string toIFB(const Kolab::Freebusy &freebusy)
fb->setLastModified(Kolab::Conversion::toDate(freebusy.timestamp()));
KCalCore::ICalFormat format;
format.setApplication(QStringLiteral("libkolab"), QLatin1String(LIBKOLAB_LIB_VERSION_STRING));
format.setApplication(QStringLiteral("libkolab"), QStringLiteral(LIBKOLAB_LIB_VERSION_STRING));
QString data = format.createScheduleMessage(fb, KCalCore::iTIPPublish);
return Conversion::toStdString(data);
}
......
......@@ -207,7 +207,7 @@ void O2::link()
tokenRequest.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("application/x-www-form-urlencoded"));
QNetworkReply *tokenReply = manager_->post(tokenRequest, payload);
connect(tokenReply, SIGNAL(finished()), this, SLOT(onTokenReplyFinished()), Qt::QueuedConnection);
connect(tokenReply, &QNetworkReply::finished, this, &O2::onTokenReplyFinished, Qt::QueuedConnection);
connect(tokenReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onTokenReplyError(QNetworkReply::NetworkError)), Qt::QueuedConnection);
}
}
......@@ -229,7 +229,7 @@ void O2::onVerificationReceived(const QMap<QString, QString> &response)
qCDebug(TOMBOYNOTESRESOURCE_LOG) << "O2::onVerificationReceived: Emitting closeBrowser()";
Q_EMIT closeBrowser();
if (response.contains(QLatin1String("error"))) {
if (response.contains(QStringLiteral("error"))) {
qCWarning(TOMBOYNOTESRESOURCE_LOG) << "O2::onVerificationReceived: Verification failed: " << response;
Q_EMIT linkingFailed();
return;
......@@ -255,7 +255,7 @@ void O2::onVerificationReceived(const QMap<QString, QString> &response)
QByteArray data = buildRequestBody(parameters);
QNetworkReply *tokenReply = manager_->post(tokenRequest, data);
timedReplies_.add(tokenReply);
connect(tokenReply, SIGNAL(finished()), this, SLOT(onTokenReplyFinished()), Qt::QueuedConnection);
connect(tokenReply, &QNetworkReply::finished, this, &O2::onTokenReplyFinished, Qt::QueuedConnection);
connect(tokenReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onTokenReplyError(QNetworkReply::NetworkError)), Qt::QueuedConnection);
} else {
setToken(response.value(QLatin1String(O2_OAUTH2_ACCESS_TOKEN)));
......@@ -383,7 +383,7 @@ void O2::refresh()
QByteArray data = buildRequestBody(parameters);
QNetworkReply *refreshReply = manager_->post(refreshRequest, data);
timedReplies_.add(refreshReply);
connect(refreshReply, SIGNAL(finished()), this, SLOT(onRefreshFinished()), Qt::QueuedConnection);
connect(refreshReply, &QNetworkReply::finished, this, &O2::onRefreshFinished, Qt::QueuedConnection);
connect(refreshReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onRefreshError(QNetworkReply::NetworkError)), Qt::QueuedConnection);
}
......
......@@ -18,7 +18,7 @@ O2Requestor::O2Requestor(QNetworkAccessManager *manager, O2 *authenticator, QObj
timedReplies_.setIgnoreSslErrors(authenticator->ignoreSslErrors());
}
qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
connect(authenticator, SIGNAL(refreshFinished(QNetworkReply::NetworkError)), this, SLOT(onRefreshFinished(QNetworkReply::NetworkError)), Qt::QueuedConnection);
connect(authenticator, &O2::refreshFinished, this, &O2Requestor::onRefreshFinished, Qt::QueuedConnection);
}
O2Requestor::~O2Requestor()
......@@ -33,7 +33,7 @@ int O2Requestor::get(const QNetworkRequest &req)
reply_ = manager_->get(request_);
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_, &QNetworkReply::finished, this, &O2Requestor::onRequestFinished, Qt::QueuedConnection);
return id_;
}
......@@ -46,7 +46,7 @@ int O2Requestor::post(const QNetworkRequest &req, const QByteArray &data)
reply_ = manager_->post(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_, &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