diff options
Diffstat (limited to 'qt-models/gpslistmodel.cpp')
-rw-r--r-- | qt-models/gpslistmodel.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/qt-models/gpslistmodel.cpp b/qt-models/gpslistmodel.cpp index 8d874d67b..33eb8a5ea 100644 --- a/qt-models/gpslistmodel.cpp +++ b/qt-models/gpslistmodel.cpp @@ -3,11 +3,8 @@ #include "core/qthelper.h" #include <QVector> -GpsListModel *GpsListModel::m_instance = NULL; - -GpsListModel::GpsListModel(QObject *parent) : QAbstractListModel(parent) +GpsListModel::GpsListModel() { - m_instance = this; } void GpsListModel::update() @@ -65,6 +62,7 @@ QHash<int, QByteArray> GpsListModel::roleNames() const GpsListModel *GpsListModel::instance() { - return m_instance; + static GpsListModel self; + return &self; } |