diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-07-16 19:23:02 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-16 16:07:01 -0700 |
commit | c34ee894aba385d8666872cf8c6c28d59f257ba4 (patch) | |
tree | 95a7ef52171fb6eb216236ca69b7d3db18b59bf3 /qt-ui/mainwindow.cpp | |
parent | e5b06bf6c8bfac039c601ebf988712ed5bf1a28e (diff) | |
download | subsurface-c34ee894aba385d8666872cf8c6c28d59f257ba4.tar.gz |
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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |