mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove global DiveLocationLineEdit variable
DiveLocationLineEdit stored a pointer to itself in a global variable so that the DiveLocationModel can access it to access the filter text. Instead, on change simply pass the filter text down from DiveLocationLineEdit to DiveLocationModel. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
15b2dbede4
commit
f09177e872
2 changed files with 15 additions and 11 deletions
|
|
@ -45,10 +45,12 @@ private:
|
|||
|
||||
class DiveLocationFilterProxyModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT
|
||||
QString filter;
|
||||
public:
|
||||
DiveLocationFilterProxyModel(QObject *parent = 0);
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
|
||||
bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override;
|
||||
void setFilter(const QString &filter);
|
||||
};
|
||||
|
||||
class DiveLocationModel : public QAbstractTableModel {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue