summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-29 10:44:27 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-04 09:19:10 -0700
commit1e1f33c0f5ea134b832a6ff52086d83d1ef23111 (patch)
tree2f7dd01e09ad54b4958768d96102de48d3bda648 /qt-models/divelistmodel.h
parent3db50aedeaea94b7395fe6fcdb56bda9bee2f2cb (diff)
downloadsubsurface-1e1f33c0f5ea134b832a6ff52086d83d1ef23111.tar.gz
Cleanup: Make constructor of singletons private
This guarantees that they are actually singletons: there can only be one application-wide instantiation of these objects. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelistmodel.h')
-rw-r--r--qt-models/divelistmodel.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h
index e7fb5369c..90cc51966 100644
--- a/qt-models/divelistmodel.h
+++ b/qt-models/divelistmodel.h
@@ -11,7 +11,6 @@ class DiveListSortModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
- DiveListSortModel();
static DiveListSortModel *instance();
void setSourceModel(QAbstractItemModel *sourceModel);
Q_INVOKABLE void reload();
@@ -25,6 +24,7 @@ public slots:
protected:
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
private:
+ DiveListSortModel();
QString filterString;
void updateFilterState();
};
@@ -33,7 +33,6 @@ class DiveListModel : public QAbstractListModel
{
Q_OBJECT
public:
-
enum DiveListRoles {
DiveRole = Qt::UserRole + 1,
DiveDateRole,
@@ -47,7 +46,6 @@ public:
};
static DiveListModel *instance();
- DiveListModel();
void addDive(const QList<dive *> &listOfDives);
void addAllDives();
void insertDive(int i);
@@ -65,6 +63,8 @@ public:
void resetInternalData();
void clear(); // Clear all dives in core
Q_INVOKABLE DiveObjectHelper at(int i);
+private:
+ DiveListModel();
};
#endif // DIVELISTMODEL_H