summaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.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/subsurfacewebservices.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/subsurfacewebservices.cpp')
-rw-r--r--qt-ui/subsurfacewebservices.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 918cf53f3..86dbf5015 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -333,9 +333,9 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton* button)
/* now merge the data in the gps_location table into the dive_table */
if (merge_locations_into_dives()) {
mark_divelist_changed(true);
- mainWindow()->globe()->repopulateLabels();
- mainWindow()->globe()->centerOn(current_dive);
- mainWindow()->information()->updateDiveInfo(selected_dive);
+ MainWindow::instance()->globe()->repopulateLabels();
+ MainWindow::instance()->globe()->centerOn(current_dive);
+ MainWindow::instance()->information()->updateDiveInfo(selected_dive);
}
/* store last entered uid in config */
@@ -558,7 +558,7 @@ out:
DivelogsDeWebServices* DivelogsDeWebServices::instance()
{
- static DivelogsDeWebServices *self = new DivelogsDeWebServices(mainWindow());
+ static DivelogsDeWebServices *self = new DivelogsDeWebServices(MainWindow::instance());
self->setAttribute(Qt::WA_QuitOnClose, false);
return self;
}
@@ -586,7 +586,7 @@ void DivelogsDeWebServices::prepareDivesForUpload()
return;
}
}
- mainWindow()->showError(errorText);
+ MainWindow::instance()->showError(errorText);
}
void DivelogsDeWebServices::uploadDives(QIODevice *dldContent)
@@ -855,11 +855,11 @@ void DivelogsDeWebServices::buttonClicked(QAbstractButton* button)
char *error = NULL;
parse_file(QFile::encodeName(zipFile.fileName()), &error);
if (error != NULL) {
- mainWindow()->showError(error);
+ MainWindow::instance()->showError(error);
free(error);
}
process_dives(true, false);
- mainWindow()->refreshDisplay();
+ MainWindow::instance()->refreshDisplay();
/* store last entered user/pass in config */
QSettings s;