aboutsummaryrefslogtreecommitdiff
path: root/api/logic/minecraft/ComponentUpdateTask.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2020-06-27 12:02:31 +0200
committerPetr Mrázek <peterix@gmail.com>2020-06-27 12:02:31 +0200
commita0ef20a264656c127dd62eb9140e89a2fda6a8e0 (patch)
tree43b9262f501e9ec835939ec50cc23473e661b291 /api/logic/minecraft/ComponentUpdateTask.cpp
parent4ca62916f562ca2d233d0fb4771054a106f1afc3 (diff)
downloadPrismLauncher-a0ef20a264656c127dd62eb9140e89a2fda6a8e0.tar.gz
PrismLauncher-a0ef20a264656c127dd62eb9140e89a2fda6a8e0.tar.bz2
PrismLauncher-a0ef20a264656c127dd62eb9140e89a2fda6a8e0.zip
NOISSUE rename ComponentList to PackProfile
It's not just components, so the naming needed cleaning up.
Diffstat (limited to 'api/logic/minecraft/ComponentUpdateTask.cpp')
-rw-r--r--api/logic/minecraft/ComponentUpdateTask.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/api/logic/minecraft/ComponentUpdateTask.cpp b/api/logic/minecraft/ComponentUpdateTask.cpp
index 84c0474c..241d9a49 100644
--- a/api/logic/minecraft/ComponentUpdateTask.cpp
+++ b/api/logic/minecraft/ComponentUpdateTask.cpp
@@ -1,7 +1,7 @@
#include "ComponentUpdateTask.h"
-#include "ComponentList_p.h"
-#include "ComponentList.h"
+#include "PackProfile_p.h"
+#include "PackProfile.h"
#include "Component.h"
#include <Env.h>
#include <meta/Index.h>
@@ -22,16 +22,16 @@
* Really, it should be a reactor/state machine that receives input from the application
* and dynamically adapts to changing requirements...
*
- * The reactor should be the only entry into manipulating the ComponentList.
+ * The reactor should be the only entry into manipulating the PackProfile.
* See: https://en.wikipedia.org/wiki/Reactor_pattern
*/
/*
- * Or make this operate on a snapshot of the ComponentList state, then merge results in as long as the snapshot and ComponentList didn't change?
+ * Or make this operate on a snapshot of the PackProfile state, then merge results in as long as the snapshot and PackProfile didn't change?
* If the component list changes, start over.
*/
-ComponentUpdateTask::ComponentUpdateTask(Mode mode, Net::Mode netmode, ComponentList* list, QObject* parent)
+ComponentUpdateTask::ComponentUpdateTask(Mode mode, Net::Mode netmode, PackProfile* list, QObject* parent)
: Task(parent)
{
d.reset(new ComponentUpdateTaskData);
@@ -126,7 +126,7 @@ static LoadResult loadComponent(ComponentPtr component, shared_qobject_ptr<Task>
// FIXME: dead code. determine if this can still be useful?
/*
-static LoadResult loadComponentList(ComponentPtr component, shared_qobject_ptr<Task>& loadTask, Net::Mode netmode)
+static LoadResult loadPackProfile(ComponentPtr component, shared_qobject_ptr<Task>& loadTask, Net::Mode netmode)
{
if(component->m_loaded)
{
@@ -217,7 +217,7 @@ void ComponentUpdateTask::loadComponents()
}
case Mode::Resolution:
{
- singleResult = loadComponentList(component, loadTask, d->netmode);
+ singleResult = loadPackProfile(component, loadTask, d->netmode);
loadType = RemoteLoadStatus::Type::List;
break;
}
@@ -244,7 +244,7 @@ void ComponentUpdateTask::loadComponents()
});
RemoteLoadStatus status;
status.type = loadType;
- status.componentListIndex = componentIndex;
+ status.PackProfileIndex = componentIndex;
d->remoteLoadStatusList.append(status);
taskIndex++;
}
@@ -495,7 +495,7 @@ static bool getTrivialComponentChanges(const ComponentIndex & index, const Requi
}
// FIXME, TODO: decouple dependency resolution from loading
-// FIXME: This works directly with the ComponentList internals. It shouldn't! It needs richer data types than ComponentList uses.
+// FIXME: This works directly with the PackProfile internals. It shouldn't! It needs richer data types than PackProfile uses.
// FIXME: throw all this away and use a graph
void ComponentUpdateTask::resolveDependencies(bool checkOnly)
{
@@ -648,7 +648,7 @@ void ComponentUpdateTask::remoteLoadSucceeded(size_t taskIndex)
// update the cached data of the component from the downloaded version file.
if (taskSlot.type == RemoteLoadStatus::Type::Version)
{
- auto component = d->m_list->getComponent(taskSlot.componentListIndex);
+ auto component = d->m_list->getComponent(taskSlot.PackProfileIndex);
component->m_loaded = true;
component->updateCachedData();
}