diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-04-05 15:48:31 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-04-05 15:48:31 +0200 |
commit | 3d04593f513916ee6e4fcb1ec2d18afa7b76590a (patch) | |
tree | fc752bed082882198ede2a552005d14e36b79f53 /lib/jobs | |
parent | b1466995c4e93d196bbf932593a64e530a7fded9 (diff) | |
download | libquotient-3d04593f513916ee6e4fcb1ec2d18afa7b76590a.tar.gz libquotient-3d04593f513916ee6e4fcb1ec2d18afa7b76590a.zip |
RequestData: create empty QByteArray by default
May fix #380. Also: remove explicit copying disablers,
the unique_ptr<> member disables copying just fine.
Diffstat (limited to 'lib/jobs')
-rw-r--r-- | lib/jobs/requestdata.h | 8 |
1 files changed, 3 insertions, 5 deletions
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 <QtCore/QByteArray> + #include <memory> -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<QIODevice>(source)) {} - RequestData(const RequestData&) = delete; - RequestData& operator=(const RequestData&) = delete; RequestData(RequestData&&) = default; RequestData& operator=(RequestData&&) = default; ~RequestData(); |