aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-05-12 21:23:56 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-05-12 21:23:56 +0200
commit3c2f98375c4b82e7f1ee8a0f5d477e55c8685075 (patch)
treebbf98f90217cd721d990f91a9cd7365cc965ad81
parent6ff843d2d4915c037ad2dbe7470a34b2cbb279bc (diff)
downloadlibquotient-3c2f98375c4b82e7f1ee8a0f5d477e55c8685075.tar.gz
libquotient-3c2f98375c4b82e7f1ee8a0f5d477e55c8685075.zip
basejob.cpp: nitpicks from clang-format
-rw-r--r--lib/jobs/basejob.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 8e1a63aa..470250bf 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -149,15 +149,9 @@ BaseJob::~BaseJob()
qCDebug(d->logCat) << this << "destroyed";
}
-QUrl BaseJob::requestUrl() const
-{
- return d->reply ? d->reply->url() : QUrl();
-}
+QUrl BaseJob::requestUrl() const { return d->reply ? d->reply->url() : QUrl(); }
-bool BaseJob::isBackground() const
-{
- return d->inBackground;
-}
+bool BaseJob::isBackground() const { return d->inBackground; }
const QString& BaseJob::apiEndpoint() const { return d->apiEndpoint; }
@@ -215,7 +209,7 @@ QUrl BaseJob::makeRequestUrl(QUrl baseUrl, const QString& path,
// QUrl::adjusted(QUrl::StripTrailingSlashes) doesn't help with root '/'
while (pathBase.endsWith('/'))
pathBase.chop(1);
- if (!path.startsWith('/')) // Normally API files do start with '/'
+ if (!path.startsWith('/')) // Normally API files do start with '/'
pathBase.push_back('/'); // so this shouldn't be needed these days
baseUrl.setPath(pathBase + path, QUrl::TolerantMode);
@@ -259,11 +253,11 @@ void BaseJob::Private::sendRequest()
}
}
-void BaseJob::doPrepare() {}
+void BaseJob::doPrepare() { }
-void BaseJob::onSentRequest(QNetworkReply*) {}
+void BaseJob::onSentRequest(QNetworkReply*) { }
-void BaseJob::beforeAbandon(QNetworkReply*) {}
+void BaseJob::beforeAbandon(QNetworkReply*) { }
void BaseJob::initiate(ConnectionData* connData, bool inBackground)
{
@@ -273,7 +267,8 @@ void BaseJob::initiate(ConnectionData* connData, bool inBackground)
doPrepare();
if ((d->verb == HttpVerb::Post || d->verb == HttpVerb::Put)
- && d->requestData.source() && !d->requestData.source()->isReadable()) {
+ && d->requestData.source()
+ && !d->requestData.source()->isReadable()) {
setStatus(FileError, "Request data not ready");
}
Q_ASSERT(status().code != Pending); // doPrepare() must NOT set this