diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 8 | ||||
-rw-r--r-- | desktop-widgets/modeldelegates.cpp | 4 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 7356f8370..f4da411af 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -114,9 +114,9 @@ void LocationInformationWidget::updateLabels() else ui.diveSiteNotes->clear(); if (has_location(&diveSite->location)) { - const char *coords = printGPSCoords(&diveSite->location); + char *coords = printGPSCoords(&diveSite->location); ui.diveSiteCoordinates->setText(coords); - free((void *)coords); + free(coords); } else { ui.diveSiteCoordinates->clear(); } @@ -138,10 +138,10 @@ void LocationInformationWidget::updateGpsCoordinates(const location_t &location) { QString oldText = ui.diveSiteCoordinates->text(); - const char *coords = printGPSCoords(&location); + char *coords = printGPSCoords(&location); ui.diveSiteCoordinates->setText(coords); enableLocationButtons(has_location(&location)); - free((void *)coords); + free(coords); if (oldText != ui.diveSiteCoordinates->text()) markChangedWidget(ui.diveSiteCoordinates); } diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp index a237c1306..c6405a433 100644 --- a/desktop-widgets/modeldelegates.cpp +++ b/desktop-widgets/modeldelegates.cpp @@ -484,9 +484,9 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem } if (bottomText.isEmpty()) { - const char *gpsCoords = printGPSCoords(&ds->location); + char *gpsCoords = printGPSCoords(&ds->location); bottomText = QString(gpsCoords); - free( (void*) gpsCoords); + free(gpsCoords); } if (dive_site_has_gps_location(ds) && currentDiveSiteHasGPS) { diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 11ad99d50..a2ff15368 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -411,9 +411,9 @@ void MainTab::updateDiveInfo(bool clear) ui.locationTags->setText(constructLocationTags(&ds->taxonomy, true)); if (ui.locationTags->text().isEmpty() && has_location(&ds->location)) { - const char *coords = printGPSCoords(&ds->location); + char *coords = printGPSCoords(&ds->location); ui.locationTags->setText(coords); - free((void *)coords); + free(coords); } } else { ui.location->clear(); |