aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceList.h
diff options
context:
space:
mode:
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.