diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-07-18 22:15:08 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-07-18 22:15:08 +0200 |
commit | e4bfe89b3b2fea57a7267abb7cf892e15f1deeb5 (patch) | |
tree | 48fb25479773285aaa422b967893f29a2f8ed2d9 /lib/jobs | |
parent | e4a08bc431be9a2b680a4cd70f2ceda07c99b7bf (diff) | |
parent | 2187f26ebdc9edf7b3cbfa1d208c03c4384f4135 (diff) | |
download | libquotient-e4bfe89b3b2fea57a7267abb7cf892e15f1deeb5.tar.gz libquotient-e4bfe89b3b2fea57a7267abb7cf892e15f1deeb5.zip |
Merge branch 'kitsune-member-state-enum' into master
Diffstat (limited to 'lib/jobs')
-rw-r--r-- | lib/jobs/basejob.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index 9a7b9b5e..400a9243 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -5,6 +5,7 @@ #include "basejob.h" #include "connectiondata.h" +#include "quotient_common.h" #include <QtCore/QRegularExpression> #include <QtCore/QTimer> @@ -15,8 +16,6 @@ #include <QtNetwork/QNetworkReply> #include <QtNetwork/QNetworkRequest> -#include <array> - using namespace Quotient; using std::chrono::seconds, std::chrono::milliseconds; using namespace std::chrono_literals; @@ -63,12 +62,6 @@ QDebug BaseJob::Status::dumpToLog(QDebug dbg) const return dbg << ": " << message; } -template <typename... Ts> -constexpr auto make_array(Ts&&... items) -{ - return std::array<std::common_type_t<Ts...>, sizeof...(Ts)>({items...}); -} - class BaseJob::Private { public: struct JobTimeoutConfig { @@ -163,8 +156,8 @@ public: { // FIXME: use std::array {} when Apple stdlib gets deduction guides for it static const auto verbs = - make_array(QStringLiteral("GET"), QStringLiteral("PUT"), - QStringLiteral("POST"), QStringLiteral("DELETE")); + to_array({ QStringLiteral("GET"), QStringLiteral("PUT"), + QStringLiteral("POST"), QStringLiteral("DELETE") }); const auto verbWord = verbs.at(size_t(verb)); return verbWord % ' ' % (reply ? reply->url().toString(QUrl::RemoveQuery) |