aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceList.h
diff options
context:
space:
mode:
authorkumquat-ir <66188216+kumquat-ir@users.noreply.github.com>2022-07-31 14:54:50 -0400
committerkumquat-ir <66188216+kumquat-ir@users.noreply.github.com>2022-07-31 14:54:50 -0400
commit579582740e9efd5a054b02a8b0e1d8999abfa6fa (patch)
tree5b07ba3387dfebabd68e534d79f7bf7363aad67c /launcher/InstanceList.h
parent20b1723e78149c1f2ac4072cbd46997e9c5160fa (diff)
parentb15544c163ccbca08ea498b3b3a51c82d7fb3e12 (diff)
downloadPrismLauncher-579582740e9efd5a054b02a8b0e1d8999abfa6fa.tar.gz
PrismLauncher-579582740e9efd5a054b02a8b0e1d8999abfa6fa.tar.bz2
PrismLauncher-579582740e9efd5a054b02a8b0e1d8999abfa6fa.zip
Merge remote-tracking branch 'origin/develop' into download-all-blocked
Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
Diffstat (limited to 'launcher/InstanceList.h')
-rw-r--r--launcher/InstanceList.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/launcher/InstanceList.h b/launcher/InstanceList.h
index bc6c3af0..62282f04 100644
--- a/launcher/InstanceList.h
+++ b/launcher/InstanceList.h
@@ -19,6 +19,8 @@
#include <QAbstractListModel>
#include <QSet>
#include <QList>
+#include <QStack>
+#include <QPair>
#include "BaseInstance.h"
@@ -46,6 +48,12 @@ enum class GroupsState
Dirty
};
+struct TrashHistoryItem {
+ QString id;
+ QString polyPath;
+ QString trashPath;
+ QString groupName;
+};
class InstanceList : public QAbstractListModel
{
@@ -102,6 +110,9 @@ public:
void setInstanceGroup(const InstanceId & id, const GroupId& name);
void deleteGroup(const GroupId & name);
+ bool trashInstance(const InstanceId &id);
+ bool trashedSomething();
+ void undoTrashInstance();
void deleteInstance(const InstanceId & id);
// Wrap an instance creation task in some more task machinery and make it ready to be used
@@ -180,4 +191,6 @@ private:
QSet<InstanceId> instanceSet;
bool m_groupsLoaded = false;
bool m_instancesProbed = false;
+
+ QStack<TrashHistoryItem> m_trashHistory;
};