mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert the singleton PR
It turns out that this isn't working the way it was intended to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
400b218f76
commit
9ae7040a91
15 changed files with 118 additions and 89 deletions
|
|
@ -6,7 +6,6 @@
|
|||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "core/subsurface-qt/DiveObjectHelper.h"
|
||||
#include "core/singleton.h"
|
||||
|
||||
class DiveListSortModel : public QSortFilterProxyModel
|
||||
{
|
||||
|
|
@ -29,7 +28,7 @@ private:
|
|||
void updateFilterState();
|
||||
};
|
||||
|
||||
class DiveListModel : public QAbstractListModel, public SillySingleton<DiveListModel>
|
||||
class DiveListModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
@ -46,6 +45,7 @@ public:
|
|||
DepthDurationRole,
|
||||
};
|
||||
|
||||
static DiveListModel *instance();
|
||||
DiveListModel(QObject *parent = 0);
|
||||
void addDive(const QList<dive *> &listOfDives);
|
||||
void addAllDives();
|
||||
|
|
@ -63,6 +63,8 @@ public:
|
|||
QString startAddDive();
|
||||
void resetInternalData();
|
||||
Q_INVOKABLE DiveObjectHelper at(int i);
|
||||
private:
|
||||
static DiveListModel *m_instance;
|
||||
};
|
||||
|
||||
#endif // DIVELISTMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue