Replace mainWindow() with MainWindow::instance()

C++ style of accessing single instance class object.

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Boris Barbulovski 2014-02-12 15:22:54 +01:00 committed by Dirk Hohndel
parent cc37d2e94a
commit c86822c2f4
18 changed files with 104 additions and 96 deletions

View file

@ -334,7 +334,7 @@ void CylindersModel::remove(const QModelIndex& index)
}
cylinder_t *cyl = &current->cylinder[index.row()];
if (DivePlannerPointsModel::instance()->tankInUse(cyl->gasmix.o2.permille, cyl->gasmix.he.permille)) {
QMessageBox::warning(mainWindow(), TITLE_OR_TEXT(
QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(
tr("Cylinder cannot be removed"),
tr("This gas in use. Only cylinders that are not used in the dive can be removed.")),
QMessageBox::Ok);