diff options
Diffstat (limited to 'qt-models/divelistmodel.h')
-rw-r--r-- | qt-models/divelistmodel.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index d6eb07463..cccece51d 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -6,6 +6,7 @@ #include <QSortFilterProxyModel> #include "core/subsurface-qt/DiveObjectHelper.h" +#include "core/singleton.h" class DiveListSortModel : public QSortFilterProxyModel { @@ -28,7 +29,7 @@ private: void updateFilterState(); }; -class DiveListModel : public QAbstractListModel +class DiveListModel : public QAbstractListModel, public SillySingleton<DiveListModel> { Q_OBJECT public: @@ -45,7 +46,6 @@ public: DepthDurationRole, }; - static DiveListModel *instance(); DiveListModel(QObject *parent = 0); void addDive(const QList<dive *> &listOfDives); void addAllDives(); @@ -63,8 +63,6 @@ public: QString startAddDive(); void resetInternalData(); Q_INVOKABLE DiveObjectHelper at(int i); -private: - static DiveListModel *m_instance; }; #endif // DIVELISTMODEL_H |