mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
cc37d2e94a
commit
c86822c2f4
18 changed files with 104 additions and 96 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue