Cleanup: turn GpsListModel into standard singleton

GpsListModel was one of those "special" singletons that could
be created explicitly with new. This would make sense if a
parameter were passed to the constructor. We only passed null,
so one might as well turn that into a classical singleton with
default constructor.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-09-28 23:23:57 +02:00 committed by Dirk Hohndel
parent 36d42a6a57
commit 2a9a3dda20
3 changed files with 5 additions and 9 deletions

View file

@ -20,7 +20,7 @@ public:
};
static GpsListModel *instance();
GpsListModel(QObject *parent = 0);
GpsListModel();
void clear();
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QHash<int, QByteArray> roleNames() const;
@ -28,7 +28,6 @@ public:
void update();
private:
QVector<gpsTracker> m_gpsFixes;
static GpsListModel *m_instance;
};
#endif // GPSLISTMODEL_H