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>
This commit is contained in:
flow
2022-07-08 13:00:44 -03:00
parent 4441b37338
commit 208ed73e59
6 changed files with 185 additions and 26 deletions

View File

@ -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.