summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-12 15:31:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit5aacd73a00bac5721674b1f8b223d3aacc862a4c (patch)
tree81e99850a8cb23500831ccade3335bac503056b8 /desktop-widgets
parent858d3e2eed188b609090b20ecaba2f779aedb6eb (diff)
downloadsubsurface-5aacd73a00bac5721674b1f8b223d3aacc862a4c.tar.gz
Filter: call update title directly in filter model
Instead of sending a signal when counts change, catching them in the filter widget and update the window title there, directly update the window title in the model. This removes a signal/slot pair. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/filterwidget2.cpp10
-rw-r--r--desktop-widgets/filterwidget2.h1
2 files changed, 0 insertions, 11 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp
index d95311da3..622b66aa6 100644
--- a/desktop-widgets/filterwidget2.cpp
+++ b/desktop-widgets/filterwidget2.cpp
@@ -119,10 +119,6 @@ FilterWidget2::FilterWidget2(QWidget* parent) :
connect(qPrefUnits::instance(), &qPrefUnits::unit_systemChanged,
this, &FilterWidget2::temperatureChanged);
- // Update counts if dives were added / removed
- connect(MultiFilterSortModel::instance(), &MultiFilterSortModel::countsChanged,
- this, &FilterWidget2::countsChanged);
-
// Reset all fields.
clearFilter();
}
@@ -241,12 +237,6 @@ void FilterWidget2::hideEvent(QHideEvent *event)
void FilterWidget2::filterDataChanged(const FilterData &data)
{
MultiFilterSortModel::instance()->filterDataChanged(data);
- countsChanged();
-}
-
-void FilterWidget2::countsChanged()
-{
- updateWindowTitle();
}
QString FilterWidget2::shownText()
diff --git a/desktop-widgets/filterwidget2.h b/desktop-widgets/filterwidget2.h
index 297d65e4e..212f6b5ae 100644
--- a/desktop-widgets/filterwidget2.h
+++ b/desktop-widgets/filterwidget2.h
@@ -33,7 +33,6 @@ private slots:
void clearFilter();
void closeFilter();
void temperatureChanged();
- void countsChanged();
private:
bool ignoreSignal;