Made JavaDownloader a task and added some quick UI

Signed-off-by: timoreo <contact@timoreo.fr>
This commit is contained in:
timoreo 2022-07-10 19:56:52 +02:00
parent 54ad91c3b7
commit 53ddba8077
No known key found for this signature in database
GPG key ID: 121A72C3512BA288
3 changed files with 67 additions and 29 deletions

View file

@ -1,8 +1,17 @@
#pragma once
#include <QString>
#include "tasks/Task.h"
namespace JavaDownloader {
/*Downloads the java to the runtimes folder*/
void downloadJava(bool isLegacy, const QString& OS);
} // namespace JavaDownloader
class JavaDownloader : public Task {
Q_OBJECT
public:
/*Downloads the java to the runtimes folder*/
explicit JavaDownloader(bool isLegacy, const QString& OS) : m_isLegacy(isLegacy), m_OS(OS) {}
void executeTask() override;
private:
bool m_isLegacy;
const QString& m_OS;
};