diff options
author | Kode <TheKodeToad@proton.me> | 2023-05-13 19:07:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-13 19:07:03 +0100 |
commit | f60562c5a247934e39ab33a6d1c5ce64b3127f6a (patch) | |
tree | 3e0ff5817464de7c050c580397503daa9f0ee7bd /launcher/net/Download.h | |
parent | 18cfe219fef2aabc1d3260764c02cd3476615176 (diff) | |
parent | d5c6a1b4d1e6d052e42366d19ffa0047168e030d (diff) | |
download | PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.tar.gz PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.tar.bz2 PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.zip |
Merge branch 'develop' into mrpack-export
Signed-off-by: Kode <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/net/Download.h')
-rw-r--r-- | launcher/net/Download.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/launcher/net/Download.h b/launcher/net/Download.h index 7e1df322..920164a3 100644 --- a/launcher/net/Download.h +++ b/launcher/net/Download.h @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (c) 2022 flowln <flowlnlnln@gmail.com> * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> + * Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +23,7 @@ * Copyright 2013-2021 MultiMC Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -36,6 +38,8 @@ #pragma once +#include <chrono> + #include "HttpMetaCache.h" #include "NetAction.h" #include "Sink.h" @@ -70,7 +74,7 @@ class Download : public NetAction { protected slots: void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) override; void downloadError(QNetworkReply::NetworkError error) override; - void sslErrors(const QList<QSslError>& errors); + void sslErrors(const QList<QSslError>& errors) override; void downloadFinished() override; void downloadReadyRead() override; @@ -80,6 +84,10 @@ class Download : public NetAction { private: std::unique_ptr<Sink> m_sink; Options m_options; + + std::chrono::steady_clock m_clock; + std::chrono::time_point<std::chrono::steady_clock> m_last_progress_time; + qint64 m_last_progress_bytes; }; } // namespace Net |