From 9579231ccc36d9d32f4d5571ced91e8fe7851643 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Fri, 31 Dec 2021 05:27:59 +0100 Subject: NOISSUE fix build and change how NetJob is used Feed it network upfront... --- launcher/net/NetJob.cpp | 6 ------ launcher/net/NetJob.h | 11 +---------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'launcher/net') diff --git a/launcher/net/NetJob.cpp b/launcher/net/NetJob.cpp index b190b3e9..9bad89ed 100644 --- a/launcher/net/NetJob.cpp +++ b/launcher/net/NetJob.cpp @@ -98,12 +98,6 @@ void NetJob::partProgress(int index, qint64 bytesReceived, qint64 bytesTotal) void NetJob::executeTask() { - if(!m_network) { - qCritical() << "Attempted to start NetJob" << objectName() << "without the network set!"; - emitFailed(tr("Internal error: NetJob '%1' has been started without a network pointer!").arg(objectName())); - return; - } - // hack that delays early failures so they can be caught easier QMetaObject::invokeMethod(this, "startMoreParts", Qt::QueuedConnection); } diff --git a/launcher/net/NetJob.h b/launcher/net/NetJob.h index 06b23306..fdea710f 100644 --- a/launcher/net/NetJob.h +++ b/launcher/net/NetJob.h @@ -29,17 +29,12 @@ class NetJob : public Task public: using Ptr = shared_qobject_ptr; - explicit NetJob(QString job_name) : Task() + explicit NetJob(QString job_name, shared_qobject_ptr network) : Task(), m_network(network) { setObjectName(job_name); } virtual ~NetJob(); - void setNetwork(shared_qobject_ptr network) - { - m_network = network; - } - bool addNetAction(NetAction::Ptr action); NetAction::Ptr operator[](int index) @@ -70,10 +65,6 @@ private slots: public slots: virtual void executeTask() override; virtual bool abort() override; - virtual void start(shared_qobject_ptr network) { - m_network = network; - Task::start(); - } private slots: void partProgress(int index, qint64 bytesReceived, qint64 bytesTotal); -- cgit