From 406e83ac3004dc0f63b3f2e81d91067276248277 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 31 Aug 2019 23:40:34 +0200 Subject: Cleanup: remove MapLocationModel::count() and the attribute count These were not used anywhere and the function was redundant [same result as rowCount()]. Signed-off-by: Berthold Stoeger --- qt-models/maplocationmodel.cpp | 5 ----- qt-models/maplocationmodel.h | 5 ----- 2 files changed, 10 deletions(-) diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp index e5d7fa2d5..922b29ac0 100644 --- a/qt-models/maplocationmodel.cpp +++ b/qt-models/maplocationmodel.cpp @@ -116,11 +116,6 @@ int MapLocationModel::rowCount(const QModelIndex&) const return m_mapLocations.size(); } -int MapLocationModel::count() -{ - return m_mapLocations.size(); -} - void MapLocationModel::add(MapLocation *location) { beginInsertRows(QModelIndex(), m_mapLocations.size(), m_mapLocations.size()); diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h index 15000bc1d..a89695ccd 100644 --- a/qt-models/maplocationmodel.h +++ b/qt-models/maplocationmodel.h @@ -51,7 +51,6 @@ signals: class MapLocationModel : public QAbstractListModel { Q_OBJECT - Q_PROPERTY(int count READ count NOTIFY countChanged) public: MapLocationModel(QObject *parent = NULL); @@ -59,7 +58,6 @@ public: QVariant data(const QModelIndex &index, int role) const override; int rowCount(const QModelIndex &parent) const override; - int count(); void add(MapLocation *); // If map is not null, it will be used to place new dive sites without GPS location at the center of the map void reload(QObject *map); @@ -78,9 +76,6 @@ private slots: private: QVector m_mapLocations; QVector m_selectedDs; - -signals: - void countChanged(int c); }; #endif -- cgit v1.2.3-70-g09d2