summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-11-11 23:55:50 +0100
committerPetr Mrázek <peterix@gmail.com>2018-11-11 23:55:50 +0100
commitd6367407b0bf6beaab847f3da8ec290a64e5673b (patch)
tree538f87403d0a10629a356551f831f1249a25d655 /api/logic/minecraft
parentdefa911705421d9c6cfa91cd74ea987951cab94f (diff)
downloadMultiMC-d6367407b0bf6beaab847f3da8ec290a64e5673b.tar
MultiMC-d6367407b0bf6beaab847f3da8ec290a64e5673b.tar.gz
MultiMC-d6367407b0bf6beaab847f3da8ec290a64e5673b.tar.lz
MultiMC-d6367407b0bf6beaab847f3da8ec290a64e5673b.tar.xz
MultiMC-d6367407b0bf6beaab847f3da8ec290a64e5673b.zip
NOISSUE Rename OneSixUpdate to MinecraftUpdate
Diffstat (limited to 'api/logic/minecraft')
-rw-r--r--api/logic/minecraft/MinecraftInstance.cpp2
-rw-r--r--api/logic/minecraft/MinecraftLoadAndCheck.cpp4
-rw-r--r--api/logic/minecraft/MinecraftUpdate.cpp40
-rw-r--r--api/logic/minecraft/MinecraftUpdate.h6
4 files changed, 26 insertions, 26 deletions
diff --git a/api/logic/minecraft/MinecraftInstance.cpp b/api/logic/minecraft/MinecraftInstance.cpp
index 7c83b890..77647960 100644
--- a/api/logic/minecraft/MinecraftInstance.cpp
+++ b/api/logic/minecraft/MinecraftInstance.cpp
@@ -765,7 +765,7 @@ shared_qobject_ptr<Task> MinecraftInstance::createUpdateTask(Net::Mode mode)
}
case Net::Mode::Online:
{
- return shared_qobject_ptr<Task>(new OneSixUpdate(this));
+ return shared_qobject_ptr<Task>(new MinecraftUpdate(this));
}
}
return nullptr;
diff --git a/api/logic/minecraft/MinecraftLoadAndCheck.cpp b/api/logic/minecraft/MinecraftLoadAndCheck.cpp
index a5052b53..593e2fc4 100644
--- a/api/logic/minecraft/MinecraftLoadAndCheck.cpp
+++ b/api/logic/minecraft/MinecraftLoadAndCheck.cpp
@@ -28,7 +28,7 @@ void MinecraftLoadAndCheck::subtaskSucceeded()
{
if(isFinished())
{
- qCritical() << "OneSixUpdate: Subtask" << sender() << "succeeded, but work was already done!";
+ qCritical() << "MinecraftUpdate: Subtask" << sender() << "succeeded, but work was already done!";
return;
}
emitSucceeded();
@@ -38,7 +38,7 @@ void MinecraftLoadAndCheck::subtaskFailed(QString error)
{
if(isFinished())
{
- qCritical() << "OneSixUpdate: Subtask" << sender() << "failed, but work was already done!";
+ qCritical() << "MinecraftUpdate: Subtask" << sender() << "failed, but work was already done!";
return;
}
emitFailed(error);
diff --git a/api/logic/minecraft/MinecraftUpdate.cpp b/api/logic/minecraft/MinecraftUpdate.cpp
index e62ff745..3e7362d4 100644
--- a/api/logic/minecraft/MinecraftUpdate.cpp
+++ b/api/logic/minecraft/MinecraftUpdate.cpp
@@ -37,11 +37,11 @@
#include <meta/Index.h>
#include <meta/Version.h>
-OneSixUpdate::OneSixUpdate(MinecraftInstance *inst, QObject *parent) : Task(parent), m_inst(inst)
+MinecraftUpdate::MinecraftUpdate(MinecraftInstance *inst, QObject *parent) : Task(parent), m_inst(inst)
{
}
-void OneSixUpdate::executeTask()
+void MinecraftUpdate::executeTask()
{
m_tasks.clear();
// create folders
@@ -83,7 +83,7 @@ void OneSixUpdate::executeTask()
next();
}
-void OneSixUpdate::next()
+void MinecraftUpdate::next()
{
if(m_abort)
{
@@ -99,10 +99,10 @@ void OneSixUpdate::next()
if(m_currentTask > 0)
{
auto task = m_tasks[m_currentTask - 1];
- disconnect(task.get(), &Task::succeeded, this, &OneSixUpdate::subtaskSucceeded);
- disconnect(task.get(), &Task::failed, this, &OneSixUpdate::subtaskFailed);
- disconnect(task.get(), &Task::progress, this, &OneSixUpdate::progress);
- disconnect(task.get(), &Task::status, this, &OneSixUpdate::setStatus);
+ disconnect(task.get(), &Task::succeeded, this, &MinecraftUpdate::subtaskSucceeded);
+ disconnect(task.get(), &Task::failed, this, &MinecraftUpdate::subtaskFailed);
+ disconnect(task.get(), &Task::progress, this, &MinecraftUpdate::progress);
+ disconnect(task.get(), &Task::status, this, &MinecraftUpdate::setStatus);
}
if(m_currentTask == m_tasks.size())
{
@@ -113,13 +113,13 @@ void OneSixUpdate::next()
// if the task is already finished by the time we look at it, skip it
if(task->isFinished())
{
- qCritical() << "OneSixUpdate: Skipping finished subtask" << m_currentTask << ":" << task.get();
+ qCritical() << "MinecraftUpdate: Skipping finished subtask" << m_currentTask << ":" << task.get();
next();
}
- connect(task.get(), &Task::succeeded, this, &OneSixUpdate::subtaskSucceeded);
- connect(task.get(), &Task::failed, this, &OneSixUpdate::subtaskFailed);
- connect(task.get(), &Task::progress, this, &OneSixUpdate::progress);
- connect(task.get(), &Task::status, this, &OneSixUpdate::setStatus);
+ connect(task.get(), &Task::succeeded, this, &MinecraftUpdate::subtaskSucceeded);
+ connect(task.get(), &Task::failed, this, &MinecraftUpdate::subtaskFailed);
+ connect(task.get(), &Task::progress, this, &MinecraftUpdate::progress);
+ connect(task.get(), &Task::status, this, &MinecraftUpdate::setStatus);
// if the task is already running, do not start it again
if(!task->isRunning())
{
@@ -127,35 +127,35 @@ void OneSixUpdate::next()
}
}
-void OneSixUpdate::subtaskSucceeded()
+void MinecraftUpdate::subtaskSucceeded()
{
if(isFinished())
{
- qCritical() << "OneSixUpdate: Subtask" << sender() << "succeeded, but work was already done!";
+ qCritical() << "MinecraftUpdate: Subtask" << sender() << "succeeded, but work was already done!";
return;
}
auto senderTask = QObject::sender();
auto currentTask = m_tasks[m_currentTask].get();
if(senderTask != currentTask)
{
- qDebug() << "OneSixUpdate: Subtask" << sender() << "succeeded out of order.";
+ qDebug() << "MinecraftUpdate: Subtask" << sender() << "succeeded out of order.";
return;
}
next();
}
-void OneSixUpdate::subtaskFailed(QString error)
+void MinecraftUpdate::subtaskFailed(QString error)
{
if(isFinished())
{
- qCritical() << "OneSixUpdate: Subtask" << sender() << "failed, but work was already done!";
+ qCritical() << "MinecraftUpdate: Subtask" << sender() << "failed, but work was already done!";
return;
}
auto senderTask = QObject::sender();
auto currentTask = m_tasks[m_currentTask].get();
if(senderTask != currentTask)
{
- qDebug() << "OneSixUpdate: Subtask" << sender() << "failed out of order.";
+ qDebug() << "MinecraftUpdate: Subtask" << sender() << "failed out of order.";
m_failed_out_of_order = true;
m_fail_reason = error;
return;
@@ -164,7 +164,7 @@ void OneSixUpdate::subtaskFailed(QString error)
}
-bool OneSixUpdate::abort()
+bool MinecraftUpdate::abort()
{
if(!m_abort)
{
@@ -178,7 +178,7 @@ bool OneSixUpdate::abort()
return true;
}
-bool OneSixUpdate::canAbort() const
+bool MinecraftUpdate::canAbort() const
{
return true;
}
diff --git a/api/logic/minecraft/MinecraftUpdate.h b/api/logic/minecraft/MinecraftUpdate.h
index f7b37d73..da0c2638 100644
--- a/api/logic/minecraft/MinecraftUpdate.h
+++ b/api/logic/minecraft/MinecraftUpdate.h
@@ -27,12 +27,12 @@
class MinecraftVersion;
class MinecraftInstance;
-class OneSixUpdate : public Task
+class MinecraftUpdate : public Task
{
Q_OBJECT
public:
- explicit OneSixUpdate(MinecraftInstance *inst, QObject *parent = 0);
- virtual ~OneSixUpdate() {};
+ explicit MinecraftUpdate(MinecraftInstance *inst, QObject *parent = 0);
+ virtual ~MinecraftUpdate() {};
void executeTask() override;
bool canAbort() const override;