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>
This commit is contained in:
Tomaz Canabrava 2014-07-16 19:23:02 -03:00 committed by Dirk Hohndel
parent e5b06bf6c8
commit c34ee894ab

View file

@ -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);