diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-24 00:11:24 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-28 22:12:57 +0200 |
commit | 76d6ec91a4a9b330e8df413f76b3d8189e0eec2f (patch) | |
tree | 80ddc5d403f830ab68750b0042b5aa36d366eb8a /api/logic/InstanceList.h | |
parent | 7b439c85c0bf3583ac8970e7ab9e8db3bd65c968 (diff) | |
download | MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar.gz MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar.lz MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar.xz MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.zip |
NOISSUE simplify.
Diffstat (limited to 'api/logic/InstanceList.h')
-rw-r--r-- | api/logic/InstanceList.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/api/logic/InstanceList.h b/api/logic/InstanceList.h index 14d5280d..14b80a78 100644 --- a/api/logic/InstanceList.h +++ b/api/logic/InstanceList.h @@ -21,14 +21,12 @@ #include <QList> #include "BaseInstance.h" -#include "BaseInstanceProvider.h" +#include "FolderInstanceProvider.h" #include "multimc_logic_export.h" #include "QObjectPtr.h" -class BaseInstance; - class MULTIMC_LOGIC_EXPORT InstanceList : public QAbstractListModel { Q_OBJECT @@ -70,11 +68,11 @@ public: return m_instances.count(); } - InstListError loadList(bool complete = false); + InstListError loadList(); void saveNow(); /// Add an instance provider. Takes ownership of it. Should only be done before the first load. - void addInstanceProvider(BaseInstanceProvider * provider); + void addInstanceProvider(FolderInstanceProvider * provider); InstancePtr getInstanceById(QString id) const; QModelIndex getInstanceIndexById(const QString &id) const; @@ -99,8 +97,8 @@ private: protected: int m_watchLevel = 0; - QSet<BaseInstanceProvider *> m_updatedProviders; + bool m_dirty = false; QList<InstancePtr> m_instances; QSet<QString> m_groups; - QVector<shared_qobject_ptr<BaseInstanceProvider>> m_providers; + FolderInstanceProvider * m_provider; }; |