From c34ee894aba385d8666872cf8c6c28d59f257ba4 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 16 Jul 2014 19:23:02 -0300 Subject: Use 'this' instead of ::instance() when iside of same class. Do not use MainWindow::instance() inside of a non-static mainWindow method, that's just bogus. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 5f1e0c4bb..1016aacdf 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -85,8 +85,8 @@ MainWindow::MainWindow() : QMainWindow(), connect(ui.actionRecent3, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); connect(ui.actionRecent4, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); connect(information(), SIGNAL(addDiveFinished()), ui.newProfile, SLOT(setProfileState())); - connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), MainWindow::instance(), SLOT(planCreated())); - connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), MainWindow::instance(), SLOT(planCanceled())); + connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), this, SLOT(planCreated())); + connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled())); connect(ui.printPlan, SIGNAL(pressed()), ui.divePlannerWidget, SLOT(printDecoPlan())); #ifdef NO_PRINTING ui.printPlan->hide(); @@ -695,7 +695,7 @@ QString MainWindow::filter() bool MainWindow::askSaveChanges() { QString message; - QMessageBox response(MainWindow::instance()); + QMessageBox response(this); if (existing_filename) message = tr("Do you want to save the changes that you made in the file %1?").arg(existing_filename); -- cgit v1.2.3-70-g09d2