mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: make CylindersModel::cylinderAt private
The last outside use of the function was replaced by calls to data(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
cb80ff746b
commit
f55c15e5f9
2 changed files with 1 additions and 7 deletions
|
@ -647,11 +647,6 @@ void CylindersModelFiltered::remove(QModelIndex index)
|
||||||
source.remove(mapToSource(index));
|
source.remove(mapToSource(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
cylinder_t *CylindersModelFiltered::cylinderAt(const QModelIndex &index)
|
|
||||||
{
|
|
||||||
return source.cylinderAt(mapToSource(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CylindersModelFiltered::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
bool CylindersModelFiltered::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
||||||
{
|
{
|
||||||
return prefs.display_unused_tanks || source.cylinderUsed(source_row);
|
return prefs.display_unused_tanks || source.cylinderUsed(source_row);
|
||||||
|
|
|
@ -45,7 +45,6 @@ public:
|
||||||
void updateDecoDepths(pressure_t olddecopo2);
|
void updateDecoDepths(pressure_t olddecopo2);
|
||||||
void updateTrashIcon();
|
void updateTrashIcon();
|
||||||
void moveAtFirst(int cylid);
|
void moveAtFirst(int cylid);
|
||||||
cylinder_t *cylinderAt(const QModelIndex &index);
|
|
||||||
bool changed;
|
bool changed;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||||
bool updateBestMixes();
|
bool updateBestMixes();
|
||||||
|
@ -58,6 +57,7 @@ slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int rows;
|
int rows;
|
||||||
|
cylinder_t *cylinderAt(const QModelIndex &index);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cylinder model that hides unused cylinders if the pref.show_unused_cylinders flag is not set
|
// Cylinder model that hides unused cylinders if the pref.show_unused_cylinders flag is not set
|
||||||
|
@ -70,7 +70,6 @@ public:
|
||||||
void clear();
|
void clear();
|
||||||
void add();
|
void add();
|
||||||
void updateDive();
|
void updateDive();
|
||||||
cylinder_t *cylinderAt(const QModelIndex &index);
|
|
||||||
public
|
public
|
||||||
slots:
|
slots:
|
||||||
void remove(QModelIndex index);
|
void remove(QModelIndex index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue