From 583786757a112827ac12efdf6736d1b602e6eb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 8 Feb 2014 23:52:15 +0100 Subject: Fix crash bug related to messageboxes interrupting model resets in the instance list. --- logic/lists/InstanceList.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'logic/lists/InstanceList.h') diff --git a/logic/lists/InstanceList.h b/logic/lists/InstanceList.h index cda51a03..ebe3e051 100644 --- a/logic/lists/InstanceList.h +++ b/logic/lists/InstanceList.h @@ -27,11 +27,24 @@ class BaseInstance; class QDir; +struct FTBRecord +{ + QString dirName; + QString name; + QString logo; + QString mcVersion; + QString description; + QString instanceDir; + QString templateDir; +}; + class InstanceList : public QAbstractListModel { Q_OBJECT private: void loadGroupList(QMap &groupList); + QList discoverFTBInstances(); + void loadFTBInstances(QMap &groupMap, QList & tempList); private slots: @@ -109,7 +122,6 @@ slots: * \brief Loads the instance list. Triggers notifications. */ InstListError loadList(); - void loadForgeInstances(QMap groupMap); private slots: @@ -120,7 +132,7 @@ slots: private: int getInstIndex(BaseInstance *inst) const; - void continueProcessInstance(BaseInstance *instPtr, const int error, const QDir &dir, + bool continueProcessInstance(BaseInstance *instPtr, const int error, const QDir &dir, QMap &groupMap); protected: -- cgit v1.2.3