summaryrefslogtreecommitdiffstats
path: root/qt-ui/simplewidgets.cpp
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-12 15:22:54 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-12 11:42:59 -0800
commitc86822c2f47973528b3441d633b2b9df98ed465a (patch)
tree211d6b282dab31c3956e1fb4d5aaaa9811203c62 /qt-ui/simplewidgets.cpp
parentcc37d2e94ae34b8f260a1426e49c0ca082226502 (diff)
downloadsubsurface-c86822c2f47973528b3441d633b2b9df98ed465a.tar.gz
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>
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r--qt-ui/simplewidgets.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index d69425ef9..2a0b48307 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -107,7 +107,7 @@ void MinMaxAvgWidget::setMinimum(const QString& minimum)
RenumberDialog* RenumberDialog::instance()
{
- static RenumberDialog* self = new RenumberDialog(mainWindow());
+ static RenumberDialog* self = new RenumberDialog(MainWindow::instance());
return self;
}
@@ -127,7 +127,7 @@ RenumberDialog::RenumberDialog(QWidget *parent): QDialog(parent)
ShiftTimesDialog* ShiftTimesDialog::instance()
{
- static ShiftTimesDialog* self = new ShiftTimesDialog(mainWindow());
+ static ShiftTimesDialog* self = new ShiftTimesDialog(MainWindow::instance());
return self;
}
@@ -144,9 +144,9 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton* button)
shift_times(amount);
sort_table(&dive_table);
mark_divelist_changed(true);
- mainWindow()->dive_list()->rememberSelection();
- mainWindow()->refreshDisplay();
- mainWindow()->dive_list()->restoreSelection();
+ MainWindow::instance()->dive_list()->rememberSelection();
+ MainWindow::instance()->refreshDisplay();
+ MainWindow::instance()->dive_list()->restoreSelection();
}
}
}