summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-30 20:59:07 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-30 13:55:23 -0700
commit7fe76a5dbdef4a833122e0311191dd51896575f4 (patch)
tree34b1d4f8a7c2d6d4b6b97a142ca27937c4ec4284 /desktop-widgets/mainwindow.cpp
parent4bdd811f06096c2420a05dd3cc78fffbd7f3a663 (diff)
downloadsubsurface-7fe76a5dbdef4a833122e0311191dd51896575f4.tar.gz
Cleanup: Make WindowsTitleUpdate a global object
WindowsTitleUpdate is such a trivial object (a QObject with a single signal and no own state), that it's not really understandable why it would need all that "singleton" boiler-plate. Just make it a default constructed/destructed global object. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 64ea2ef6d..9da89f8f5 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -218,8 +218,7 @@ MainWindow::MainWindow() : QMainWindow(),
connect(information(), SIGNAL(diveSiteChanged(struct dive_site *)), mapWidget, SLOT(centerOnDiveSite(struct dive_site *)));
connect(this, &MainWindow::showError, ui.mainErrorMessage, &NotificationWidget::showError, Qt::AutoConnection);
- wtu = new WindowTitleUpdate();
- connect(WindowTitleUpdate::instance(), SIGNAL(updateTitle()), this, SLOT(setAutomaticTitle()));
+ connect(&windowTitleUpdate, &WindowTitleUpdate::updateTitle, this, &MainWindow::setAutomaticTitle);
#ifdef NO_PRINTING
plannerDetails->printPlan()->hide();
ui.menuFile->removeAction(ui.actionPrint);