From 5565a2f85e8b7a4b0e4758b5b6f4d806b964cf94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 18 Apr 2017 16:45:58 +0200 Subject: NOISSUE fix crash because of early destruction of java list load task --- api/logic/java/JavaInstallList.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'api/logic/java/JavaInstallList.h') diff --git a/api/logic/java/JavaInstallList.h b/api/logic/java/JavaInstallList.h index afc5ef43..934e588b 100644 --- a/api/logic/java/JavaInstallList.h +++ b/api/logic/java/JavaInstallList.h @@ -31,6 +31,12 @@ class JavaListLoadTask; class MULTIMC_LOGIC_EXPORT JavaInstallList : public BaseVersionList { Q_OBJECT + enum class Status + { + NotDone, + InProgress, + Done + }; public: explicit JavaInstallList(QObject *parent = 0); @@ -47,9 +53,13 @@ public slots: void updateListData(QList versions) override; protected: - QList m_vlist; + void load(); + shared_qobject_ptr getCurrentTask(); - bool m_loaded = false; +protected: + Status m_status = Status::NotDone; + shared_qobject_ptr m_loadTask; + QList m_vlist; }; class JavaListLoadTask : public Task -- cgit v1.2.3