summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-11-24 19:57:14 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-12 15:52:40 -0800
commit369c5b0dc656cbf4da2c8185debc355af4243cc5 (patch)
tree45d166b0af297a44158e5eae349b903a59026ebc /desktop-widgets/mainwindow.cpp
parent712e4680cae91ca3ca7291bc7f5124d5a3578a4d (diff)
downloadsubsurface-369c5b0dc656cbf4da2c8185debc355af4243cc5.tar.gz
desktop: init dive list header actions in constructor
The main window called a function to init the header actions (i.e. the context menu) of the dive-list. There is no reason why this shouldn't be done in the constructor of the dive list, since it only accesses the QSettings, which are available at application startup. This improves modularity of the code (by a tiny, tiny bit). Moreover, the initialization function was at the same time the header-reloading function. That function can now be folded into the settings-changed function, since that is the only remaining user. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index dfe039c51..c4a234b72 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -219,8 +219,6 @@ MainWindow::MainWindow() : QMainWindow(),
graphics->setEmptyState();
initialUiSetup();
readSettings();
- diveList->reload();
- diveList->reloadHeaderActions();
diveList->setFocus();
MapWidget::instance()->reload();
diveList->expand(diveList->model()->index(0, 0));