aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorHnatiuk Vladyslav <aders1234@gmail.com>2022-01-02 11:27:33 +0100
committerGitHub <noreply@github.com>2022-01-02 11:27:33 +0100
commit8730fb0782860f278760e369b9f42f266f0572b3 (patch)
treeea6b22c418e20a03282483bd599aa79db2e2e6cc /lib/jobs
parentca6a104941b71e7b6a8bdcb6ebcdfff5ec8e8aca (diff)
parentd516280a2b38ccb060e4f7502b873e19b1559ed1 (diff)
downloadlibquotient-8730fb0782860f278760e369b9f42f266f0572b3.tar.gz
libquotient-8730fb0782860f278760e369b9f42f266f0572b3.zip
Merge branch 'quotient-im:dev' into fix-qt-6
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.h4
-rw-r--r--lib/jobs/downloadfilejob.cpp2
-rw-r--r--lib/jobs/downloadfilejob.h3
-rw-r--r--lib/jobs/mediathumbnailjob.h2
-rw-r--r--lib/jobs/requestdata.h4
5 files changed, 10 insertions, 5 deletions
diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h
index ddf243ed..f41fc63c 100644
--- a/lib/jobs/basejob.h
+++ b/lib/jobs/basejob.h
@@ -20,7 +20,7 @@ class ConnectionData;
enum class HttpVerb { Get, Put, Post, Delete };
-class BaseJob : public QObject {
+class QUOTIENT_API BaseJob : public QObject {
Q_OBJECT
Q_PROPERTY(QUrl requestUrl READ requestUrl CONSTANT)
Q_PROPERTY(int maxRetries READ maxRetries WRITE setMaxRetries)
@@ -470,7 +470,7 @@ private:
QScopedPointer<Private> d;
};
-inline bool isJobPending(BaseJob* job)
+inline bool QUOTIENT_API isJobPending(BaseJob* job)
{
return job && job->error() == BaseJob::Pending;
}
diff --git a/lib/jobs/downloadfilejob.cpp b/lib/jobs/downloadfilejob.cpp
index 0b0531ad..6bf221cb 100644
--- a/lib/jobs/downloadfilejob.cpp
+++ b/lib/jobs/downloadfilejob.cpp
@@ -37,6 +37,8 @@ DownloadFileJob::DownloadFileJob(const QString& serverName,
setObjectName(QStringLiteral("DownloadFileJob"));
}
+DownloadFileJob::~DownloadFileJob() = default;
+
QString DownloadFileJob::targetFileName() const
{
return (d->targetFile ? d->targetFile : d->tempFile)->fileName();
diff --git a/lib/jobs/downloadfilejob.h b/lib/jobs/downloadfilejob.h
index 0752af89..9e807fe7 100644
--- a/lib/jobs/downloadfilejob.h
+++ b/lib/jobs/downloadfilejob.h
@@ -6,13 +6,14 @@
#include "csapi/content-repo.h"
namespace Quotient {
-class DownloadFileJob : public GetContentJob {
+class QUOTIENT_API DownloadFileJob : public GetContentJob {
public:
using GetContentJob::makeRequestUrl;
static QUrl makeRequestUrl(QUrl baseUrl, const QUrl& mxcUri);
DownloadFileJob(const QString& serverName, const QString& mediaId,
const QString& localFilename = {});
+ ~DownloadFileJob() override;
QString targetFileName() const;
diff --git a/lib/jobs/mediathumbnailjob.h b/lib/jobs/mediathumbnailjob.h
index 3183feb1..c9f6da35 100644
--- a/lib/jobs/mediathumbnailjob.h
+++ b/lib/jobs/mediathumbnailjob.h
@@ -8,7 +8,7 @@
#include <QtGui/QPixmap>
namespace Quotient {
-class MediaThumbnailJob : public GetContentThumbnailJob {
+class QUOTIENT_API MediaThumbnailJob : public GetContentThumbnailJob {
public:
using GetContentThumbnailJob::makeRequestUrl;
static QUrl makeRequestUrl(QUrl baseUrl, const QUrl& mxcUri,
diff --git a/lib/jobs/requestdata.h b/lib/jobs/requestdata.h
index 4f05e5ff..41ad833a 100644
--- a/lib/jobs/requestdata.h
+++ b/lib/jobs/requestdata.h
@@ -3,6 +3,8 @@
#pragma once
+#include "quotient_export.h"
+
#include <QtCore/QByteArray>
#include <memory>
@@ -19,7 +21,7 @@ namespace Quotient {
* as well as JSON (and possibly other structures in the future) to
* a QByteArray consumed by QNetworkAccessManager request methods.
*/
-class RequestData {
+class QUOTIENT_API RequestData {
public:
RequestData(const QByteArray& a = {});
RequestData(const QJsonObject& jo);