mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-22 11:39:55 +00:00
Runnable 1.6 instances!
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "Task.h"
|
||||
|
||||
Task::Task(QObject *parent) :
|
||||
QThread(parent)
|
||||
QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -49,29 +49,31 @@ void Task::setProgress(int progress)
|
||||
}
|
||||
|
||||
void Task::startTask()
|
||||
{
|
||||
start();
|
||||
}
|
||||
|
||||
void Task::run()
|
||||
{
|
||||
emitStarted();
|
||||
executeTask();
|
||||
emitEnded();
|
||||
}
|
||||
|
||||
void Task::emitStarted()
|
||||
{
|
||||
running = true;
|
||||
emit started();
|
||||
emit started(this);
|
||||
}
|
||||
|
||||
void Task::emitEnded()
|
||||
{
|
||||
running = false;
|
||||
emit ended();
|
||||
emit ended(this);
|
||||
}
|
||||
|
||||
bool Task::isRunning() const
|
||||
{
|
||||
return running;
|
||||
}
|
||||
|
||||
|
||||
void Task::emitStatusChange(const QString &status)
|
||||
{
|
||||
emit statusChanged(status);
|
||||
|
||||
Reference in New Issue
Block a user