Merge branch 'develop' into remove-updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -52,7 +52,6 @@ class NetAction : public Task {
|
||||
virtual ~NetAction() = default;
|
||||
|
||||
QUrl url() { return m_url; }
|
||||
auto index() -> int { return m_index_within_job; }
|
||||
|
||||
void setNetwork(shared_qobject_ptr<QNetworkAccessManager> network) { m_network = network; }
|
||||
|
||||
@ -75,9 +74,6 @@ class NetAction : public Task {
|
||||
public:
|
||||
shared_qobject_ptr<QNetworkAccessManager> m_network;
|
||||
|
||||
/// index within the parent job, FIXME: nuke
|
||||
int m_index_within_job = 0;
|
||||
|
||||
/// the network reply
|
||||
unique_qobject_ptr<QNetworkReply> m_reply;
|
||||
|
||||
|
@ -38,11 +38,10 @@
|
||||
|
||||
auto NetJob::addNetAction(NetAction::Ptr action) -> bool
|
||||
{
|
||||
action->m_index_within_job = m_queue.size();
|
||||
m_queue.append(action);
|
||||
|
||||
action->setNetwork(m_network);
|
||||
|
||||
addTask(action);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -123,7 +122,7 @@ auto NetJob::getFailedFiles() -> QList<QString>
|
||||
|
||||
void NetJob::updateState()
|
||||
{
|
||||
emit progress(m_done.count(), m_total_size);
|
||||
emit progress(m_done.count(), totalSize());
|
||||
setStatus(tr("Executing %1 task(s) (%2 out of %3 are done)")
|
||||
.arg(QString::number(m_doing.count()), QString::number(m_done.count()), QString::number(m_total_size)));
|
||||
.arg(QString::number(m_doing.count()), QString::number(m_done.count()), QString::number(totalSize())));
|
||||
}
|
||||
|
Reference in New Issue
Block a user