From 3d04593f513916ee6e4fcb1ec2d18afa7b76590a Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 5 Apr 2020 15:48:31 +0200 Subject: RequestData: create empty QByteArray by default May fix #380. Also: remove explicit copying disablers, the unique_ptr<> member disables copying just fine. --- lib/jobs/requestdata.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/jobs/requestdata.h b/lib/jobs/requestdata.h index 020d5ef2..9cb5ecaf 100644 --- a/lib/jobs/requestdata.h +++ b/lib/jobs/requestdata.h @@ -18,9 +18,10 @@ #pragma once +#include + #include -class QByteArray; class QJsonObject; class QJsonArray; class QJsonDocument; @@ -35,14 +36,11 @@ namespace Quotient { */ class RequestData { public: - RequestData() = default; - RequestData(const QByteArray& a); + RequestData(const QByteArray& a = {}); RequestData(const QJsonObject& jo); RequestData(const QJsonArray& ja); RequestData(QIODevice* source) : _source(std::unique_ptr(source)) {} - RequestData(const RequestData&) = delete; - RequestData& operator=(const RequestData&) = delete; RequestData(RequestData&&) = default; RequestData& operator=(RequestData&&) = default; ~RequestData(); -- cgit v1.2.3