aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceList.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-07-08 13:00:44 -0300
committerflow <flowlnlnln@gmail.com>2022-09-20 18:36:06 -0300
commit208ed73e59c46ee7966f463558c07805a9b541e6 (patch)
treeb47f092c3bd29fcad15b102dfca4248f1fb5737c /launcher/InstanceList.h
parent4441b373385f9b7f77deed2a27751337951f38f6 (diff)
downloadPrismLauncher-208ed73e59c46ee7966f463558c07805a9b541e6.tar.gz
PrismLauncher-208ed73e59c46ee7966f463558c07805a9b541e6.tar.bz2
PrismLauncher-208ed73e59c46ee7966f463558c07805a9b541e6.zip
feat: add early modrinth pack updating
Still some FIXMEs and TODOs to consider, but the general thing is here! Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/InstanceList.h')
-rw-r--r--launcher/InstanceList.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/launcher/InstanceList.h b/launcher/InstanceList.h
index 62282f04..6b4dcfa4 100644
--- a/launcher/InstanceList.h
+++ b/launcher/InstanceList.h
@@ -101,7 +101,10 @@ public:
InstListError loadList();
void saveNow();
+ /* O(n) */
InstancePtr getInstanceById(QString id) const;
+ /* O(n) */
+ InstancePtr getInstanceByManagedName(QString managed_name) const;
QModelIndex getInstanceIndexById(const QString &id) const;
QStringList getGroups();
bool isGroupCollapsed(const QString &groupName);
@@ -127,8 +130,10 @@ public:
/**
* Commit the staging area given by @keyPath to the provider - used when creation succeeds.
* Used by instance manipulation tasks.
+ * should_override is used when another similar instance already exists, and we want to override it
+ * - for instance, when updating it.
*/
- bool commitStagedInstance(const QString & keyPath, const QString& instanceName, const QString & groupName);
+ bool commitStagedInstance(const QString & keyPath, const QString& instanceName, const QString & groupName, bool should_override);
/**
* Destroy a previously created staging area given by @keyPath - used when creation fails.