aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceList.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-07-14 16:13:23 -0300
committerflow <flowlnlnln@gmail.com>2022-09-20 18:36:08 -0300
commit6131346e2f80c5ce4377fcc608be4f3929f43f91 (patch)
tree6fda9abad9995472ea58f819650768d9f5ff78df /launcher/InstanceList.h
parenteed73c90785ec977ee975d403270f9138aa6960c (diff)
downloadPrismLauncher-6131346e2f80c5ce4377fcc608be4f3929f43f91.tar.gz
PrismLauncher-6131346e2f80c5ce4377fcc608be4f3929f43f91.tar.bz2
PrismLauncher-6131346e2f80c5ce4377fcc608be4f3929f43f91.zip
refactor: change the way instance names are handled
While working on pack updating, instance naming always gets in the way, since we need both way of respecting the user's name choice, and a standarized way of getting the original pack name / version. This tries to circunvent such problems by abstracting away the naming schema into it's own struct, holding both the original name / version, and the user-defined name, so that everyone can be happy and world peace can be achieved! (at least that's what i'd hope :c). Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/InstanceList.h')
-rw-r--r--launcher/InstanceList.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/InstanceList.h b/launcher/InstanceList.h
index 6b4dcfa4..df11b55a 100644
--- a/launcher/InstanceList.h
+++ b/launcher/InstanceList.h
@@ -24,10 +24,10 @@
#include "BaseInstance.h"
-#include "QObjectPtr.h"
-
class QFileSystemWatcher;
class InstanceTask;
+struct InstanceName;
+
using InstanceId = QString;
using GroupId = QString;
using InstanceLocator = std::pair<InstancePtr, int>;
@@ -133,7 +133,7 @@ public:
* 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 should_override);
+ bool commitStagedInstance(QString keyPath, const InstanceName& instanceName, QString groupName, bool should_override);
/**
* Destroy a previously created staging area given by @keyPath - used when creation fails.