From acd44467c1100a1a774cc644921b1dc33dca1266 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 26 Oct 2018 16:57:08 +0200 Subject: Dive site: remove [start|stop]FilterDiveSite signals This is another case of a weird pattern where an object would connect it's own signal to the slot of a different object. There seems to be no reason why the former couldn't simply call the latter. Remove the [start|stop]FilterDiveSite signals of LocationInformationWidget and call the corresponding functions of MultiFilterSortModel directly. While doing so, replace the UUID argument by a pointer-to-divesite. It will be converted anyway right at the beginning of the function. Signed-off-by: Berthold Stoeger --- qt-models/filtermodels.cpp | 4 ++-- qt-models/filtermodels.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-models') diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 58d0277bd..9e9c6de60 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -684,9 +684,9 @@ void MultiFilterSortModel::clearFilter() myInvalidate(); } -void MultiFilterSortModel::startFilterDiveSite(uint32_t uuid) +void MultiFilterSortModel::startFilterDiveSite(struct dive_site *ds) { - curr_dive_site = get_dive_site_by_uuid(uuid); + curr_dive_site = ds; myInvalidate(); } diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h index 2fd5ef2b2..f962386a1 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -129,7 +129,7 @@ public slots: void myInvalidate(); void clearFilter(); - void startFilterDiveSite(uint32_t uuid); + void startFilterDiveSite(struct dive_site *ds); void stopFilterDiveSite(); void filterChanged(const QModelIndex &from, const QModelIndex &to, const QVector &roles); -- cgit v1.2.3-70-g09d2