mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b9c35e21ea
commit
406e83ac30
2 changed files with 0 additions and 10 deletions
|
@ -116,11 +116,6 @@ int MapLocationModel::rowCount(const QModelIndex&) const
|
||||||
return m_mapLocations.size();
|
return m_mapLocations.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int MapLocationModel::count()
|
|
||||||
{
|
|
||||||
return m_mapLocations.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MapLocationModel::add(MapLocation *location)
|
void MapLocationModel::add(MapLocation *location)
|
||||||
{
|
{
|
||||||
beginInsertRows(QModelIndex(), m_mapLocations.size(), m_mapLocations.size());
|
beginInsertRows(QModelIndex(), m_mapLocations.size(), m_mapLocations.size());
|
||||||
|
|
|
@ -51,7 +51,6 @@ signals:
|
||||||
class MapLocationModel : public QAbstractListModel
|
class MapLocationModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int count READ count NOTIFY countChanged)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MapLocationModel(QObject *parent = NULL);
|
MapLocationModel(QObject *parent = NULL);
|
||||||
|
@ -59,7 +58,6 @@ public:
|
||||||
|
|
||||||
QVariant data(const QModelIndex &index, int role) const override;
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
int rowCount(const QModelIndex &parent) const override;
|
int rowCount(const QModelIndex &parent) const override;
|
||||||
int count();
|
|
||||||
void add(MapLocation *);
|
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
|
// 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);
|
void reload(QObject *map);
|
||||||
|
@ -78,9 +76,6 @@ private slots:
|
||||||
private:
|
private:
|
||||||
QVector<MapLocation *> m_mapLocations;
|
QVector<MapLocation *> m_mapLocations;
|
||||||
QVector<dive_site *> m_selectedDs;
|
QVector<dive_site *> m_selectedDs;
|
||||||
|
|
||||||
signals:
|
|
||||||
void countChanged(int c);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue