From 36b9e5e31eca0354f9ad277fb668c3846714b81e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 3 Jun 2018 22:15:19 +0200 Subject: [PATCH] Cleanup: fold core/helpers.h into core/qthelper.h helpers.h included qthelper.h and all functions declared in helpers.h were defined in qthelper.h. Therefore fold the former into the latter, since the split seems completely arbitrary. While doing so, change the return-type of get_dc_nichname from "const QString" to "QString". Signed-off-by: Berthold Stoeger --- core/checkcloudconnection.cpp | 2 +- core/cloudstorage.cpp | 2 +- core/divelogexportlogic.cpp | 2 +- core/divesitehelpers.cpp | 2 +- core/gpslocation.cpp | 2 +- core/helpers.h | 55 ------------------- core/qt-init.cpp | 2 +- core/qthelper.cpp | 3 +- core/qthelper.h | 42 ++++++++++++++ core/statistics.h | 3 + core/subsurface-qt/CylinderObjectHelper.cpp | 2 +- core/subsurface-qt/DiveObjectHelper.cpp | 1 - core/subsurface-qt/SettingsObjectWrapper.cpp | 2 +- .../configuredivecomputerdialog.cpp | 2 +- .../divecomputermanagementdialog.cpp | 2 +- desktop-widgets/divelistview.cpp | 1 - desktop-widgets/divelogexportdialog.h | 1 - desktop-widgets/diveplanner.cpp | 2 +- desktop-widgets/diveshareexportdialog.cpp | 2 +- desktop-widgets/downloadfromdivecomputer.cpp | 2 +- .../facebook/facebookconnectwidget.cpp | 2 +- .../preferences/preferences_language.cpp | 2 +- desktop-widgets/printer.cpp | 2 +- desktop-widgets/printoptions.cpp | 2 +- desktop-widgets/simplewidgets.cpp | 3 +- desktop-widgets/subsurfacewebservices.cpp | 2 +- .../tab-widgets/TabDiveInformation.cpp | 2 +- .../tab-widgets/TabDiveStatistics.cpp | 2 +- desktop-widgets/tab-widgets/maintab.cpp | 2 +- desktop-widgets/templatelayout.cpp | 1 - desktop-widgets/templatelayout.h | 1 - desktop-widgets/updatemanager.cpp | 1 - desktop-widgets/usermanual.cpp | 2 +- desktop-widgets/usersurvey.cpp | 2 +- map-widget/qmlmapwidgethelper.cpp | 2 +- mobile-widgets/qmlmanager.h | 1 + packaging/ios/Subsurface-mobile.pro | 1 - profile-widget/divecartesianaxis.cpp | 2 +- profile-widget/diveprofileitem.cpp | 2 +- profile-widget/profilewidget2.cpp | 2 +- qt-models/cylindermodel.cpp | 2 +- qt-models/diveimportedmodel.cpp | 2 +- qt-models/divelistmodel.cpp | 2 +- qt-models/divelistmodel.h | 1 - qt-models/diveplannermodel.cpp | 1 - qt-models/divetripmodel.cpp | 2 +- qt-models/gpslistmodel.cpp | 2 +- qt-models/models.cpp | 2 +- qt-models/weightmodel.cpp | 2 +- qt-models/yearlystatisticsmodel.cpp | 2 +- subsurface-desktop-helper.cpp | 2 +- subsurface-mobile-helper.cpp | 2 +- subsurface-mobile-main.cpp | 1 - 53 files changed, 85 insertions(+), 106 deletions(-) delete mode 100644 core/helpers.h diff --git a/core/checkcloudconnection.cpp b/core/checkcloudconnection.cpp index f3e064c16..ce396ebf6 100644 --- a/core/checkcloudconnection.cpp +++ b/core/checkcloudconnection.cpp @@ -6,7 +6,7 @@ #include #include "pref.h" -#include "helpers.h" +#include "qthelper.h" #include "git-access.h" #include "checkcloudconnection.h" diff --git a/core/cloudstorage.cpp b/core/cloudstorage.cpp index 5e3f799db..89e4ba553 100644 --- a/core/cloudstorage.cpp +++ b/core/cloudstorage.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "cloudstorage.h" #include "pref.h" -#include "helpers.h" +#include "qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include diff --git a/core/divelogexportlogic.cpp b/core/divelogexportlogic.cpp index 283cffbca..7617e6c23 100644 --- a/core/divelogexportlogic.cpp +++ b/core/divelogexportlogic.cpp @@ -5,7 +5,7 @@ #include #include #include "divelogexportlogic.h" -#include "helpers.h" +#include "qthelper.h" #include "units.h" #include "statistics.h" #include "save-html.h" diff --git a/core/divesitehelpers.cpp b/core/divesitehelpers.cpp index 30a5ac608..3f752a320 100644 --- a/core/divesitehelpers.cpp +++ b/core/divesitehelpers.cpp @@ -7,7 +7,7 @@ #include "divesite.h" #include "subsurface-string.h" -#include "helpers.h" +#include "qthelper.h" #include "membuffer.h" #include #include diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index 7b68c68f0..e0d3e3a10 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -2,7 +2,7 @@ #include "core/gpslocation.h" #include "qt-models/gpslistmodel.h" #include "core/pref.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include #include #include diff --git a/core/helpers.h b/core/helpers.h deleted file mode 100644 index 84551b49e..000000000 --- a/core/helpers.h +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * helpers.h - * - * header file for random helper functions of Subsurface - * - */ -#ifndef HELPERS_H -#define HELPERS_H - -#include -#include "qthelper.h" - -QString get_depth_string(depth_t depth, bool showunit = false, bool showdecimal = true); -QString get_depth_string(int mm, bool showunit = false, bool showdecimal = true); -QString get_depth_unit(); -QString get_weight_string(weight_t weight, bool showunit = false); -QString get_weight_unit(); -QString get_temperature_string(temperature_t temp, bool showunit = false); -QString get_temp_unit(); -QString get_volume_string(volume_t volume, bool showunit = false); -QString get_volume_string(int mliter, bool showunit = false); -QString get_volume_unit(); -QString get_pressure_string(pressure_t pressure, bool showunit = false); -QString get_pressure_unit(); -QString getSubsurfaceDataPath(QString folderToFind); -QString getPrintingTemplatePathUser(); -QString getPrintingTemplatePathBundle(); -extern const QString get_dc_nickname(const char *model, uint32_t deviceid); -int gettimezoneoffset(timestamp_t when = 0); -int parseDurationToSeconds(const QString &text); -int parseLengthToMm(const QString &text); -int parseTemperatureToMkelvin(const QString &text); -int parseWeightToGrams(const QString &text); -int parsePressureToMbar(const QString &text); -int parseGasMixO2(const QString &text); -int parseGasMixHE(const QString &text); -QString render_seconds_to_string(int seconds); -QString get_dive_duration_string(timestamp_t when, QString hoursText, QString minutesText, QString secondsText = QObject::tr("sec"), QString separator = ":", bool isFreeDive = false); -QString get_dive_surfint_string(timestamp_t when, QString daysText, QString hoursText, QString minutesText, QString separator = " ", int maxdays = 4); -QString get_dive_date_string(timestamp_t when); -QString get_short_dive_date_string(timestamp_t when); -bool is_same_day (timestamp_t trip_when, timestamp_t dive_when); -QString get_trip_date_string(timestamp_t when, int nr, bool getday); -QString uiLanguage(QLocale *callerLoc); -QLocale getLocale(); -void selectedDivesGasUsed(QVector > &gasUsed); -QString getUserAgent(); - -#if defined __APPLE__ -#define TITLE_OR_TEXT(_t, _m) "", _t + "\n" + _m -#else -#define TITLE_OR_TEXT(_t, _m) _t, _m -#endif -#endif // HELPERS_H diff --git a/core/qt-init.cpp b/core/qt-init.cpp index 42d89f18b..f06da0cab 100644 --- a/core/qt-init.cpp +++ b/core/qt-init.cpp @@ -3,7 +3,7 @@ #include #include #include -#include "helpers.h" +#include "qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" char *settings_suffix = NULL; diff --git a/core/qthelper.cpp b/core/qthelper.cpp index cf4f8d021..b09e125ca 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "qthelper.h" #include "subsurface-string.h" -#include "helpers.h" #include "subsurface-string.h" #include "gettextfromc.h" #include "statistics.h" @@ -556,7 +555,7 @@ void set_filename(const char *filename) existing_filename = copy_string(filename); } -const QString get_dc_nickname(const char *model, uint32_t deviceid) +QString get_dc_nickname(const char *model, uint32_t deviceid) { const DiveComputerNode *existNode = dcList.getExact(model, deviceid); diff --git a/core/qthelper.h b/core/qthelper.h index e6a5d7fd6..e4c64afa8 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -51,6 +51,48 @@ QString getUUID(); QStringList imageExtensionFilters(); char *intdup(int index); char *copy_qstring(const QString &); +QString get_depth_string(depth_t depth, bool showunit = false, bool showdecimal = true); +QString get_depth_string(int mm, bool showunit = false, bool showdecimal = true); +QString get_depth_unit(); +QString get_weight_string(weight_t weight, bool showunit = false); +QString get_weight_unit(); +QString get_temperature_string(temperature_t temp, bool showunit = false); +QString get_temp_unit(); +QString get_volume_string(volume_t volume, bool showunit = false); +QString get_volume_string(int mliter, bool showunit = false); +QString get_volume_unit(); +QString get_pressure_string(pressure_t pressure, bool showunit = false); +QString get_pressure_unit(); +QString getSubsurfaceDataPath(QString folderToFind); +QString getPrintingTemplatePathUser(); +QString getPrintingTemplatePathBundle(); +QString get_dc_nickname(const char *model, uint32_t deviceid); +int gettimezoneoffset(timestamp_t when = 0); +int parseDurationToSeconds(const QString &text); +int parseLengthToMm(const QString &text); +int parseTemperatureToMkelvin(const QString &text); +int parseWeightToGrams(const QString &text); +int parsePressureToMbar(const QString &text); +int parseGasMixO2(const QString &text); +int parseGasMixHE(const QString &text); +QString render_seconds_to_string(int seconds); +QString get_dive_duration_string(timestamp_t when, QString hoursText, QString minutesText, QString secondsText = QObject::tr("sec"), QString separator = ":", bool isFreeDive = false); +QString get_dive_surfint_string(timestamp_t when, QString daysText, QString hoursText, QString minutesText, QString separator = " ", int maxdays = 4); +QString get_dive_date_string(timestamp_t when); +QString get_short_dive_date_string(timestamp_t when); +bool is_same_day (timestamp_t trip_when, timestamp_t dive_when); +QString get_trip_date_string(timestamp_t when, int nr, bool getday); +QString uiLanguage(QLocale *callerLoc); +QLocale getLocale(); +void selectedDivesGasUsed(QVector > &gasUsed); +QString getUserAgent(); + +#if defined __APPLE__ +#define TITLE_OR_TEXT(_t, _m) "", _t + "\n" + _m +#else +#define TITLE_OR_TEXT(_t, _m) _t, _m +#endif + #endif // 3) Functions visible to C and C++ diff --git a/core/statistics.h b/core/statistics.h index adc363e56..597edfb94 100644 --- a/core/statistics.h +++ b/core/statistics.h @@ -9,6 +9,9 @@ #ifndef STATISTICS_H #define STATISTICS_H +#include "core/units.h" +#include "core/dive.h" // For MAX_CYLINDERS + #ifdef __cplusplus extern "C" { #endif diff --git a/core/subsurface-qt/CylinderObjectHelper.cpp b/core/subsurface-qt/CylinderObjectHelper.cpp index ccff48d36..f2216af6f 100644 --- a/core/subsurface-qt/CylinderObjectHelper.cpp +++ b/core/subsurface-qt/CylinderObjectHelper.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "CylinderObjectHelper.h" -#include "../helpers.h" +#include "../qthelper.h" static QString EMPTY_CYLINDER_STRING = QStringLiteral(""); CylinderObjectHelper::CylinderObjectHelper(cylinder_t *cylinder) : diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index a1cfa4540..46f274522 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -5,7 +5,6 @@ #include #include "core/qthelper.h" -#include "core/helpers.h" #include "core/subsurface-string.h" #include "qt-models/tankinfomodel.h" diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp index 60473ec1a..ec80f62b8 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/core/subsurface-qt/SettingsObjectWrapper.cpp @@ -6,7 +6,7 @@ #include #include -#include "core/helpers.h" +#include "core/qthelper.h" DiveComputerSettings::DiveComputerSettings(QObject *parent): QObject(parent) diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp index 1b11e66de..bceaa98f9 100644 --- a/desktop-widgets/configuredivecomputerdialog.cpp +++ b/desktop-widgets/configuredivecomputerdialog.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "desktop-widgets/configuredivecomputerdialog.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "desktop-widgets/mainwindow.h" #include "core/display.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" diff --git a/desktop-widgets/divecomputermanagementdialog.cpp b/desktop-widgets/divecomputermanagementdialog.cpp index 62d0d4e28..0835abd6c 100644 --- a/desktop-widgets/divecomputermanagementdialog.cpp +++ b/desktop-widgets/divecomputermanagementdialog.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "desktop-widgets/divecomputermanagementdialog.h" #include "desktop-widgets/mainwindow.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "qt-models/divecomputermodel.h" #include #include diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 468daf5d1..20d708957 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -24,7 +24,6 @@ #include "desktop-widgets/divelistview.h" #include "qt-models/divepicturemodel.h" #include "core/metrics.h" -#include "core/helpers.h" DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelection(false), sortColumn(0), currentOrder(Qt::DescendingOrder), dontEmitDiveChangedSignal(false), selectionSaved(false) diff --git a/desktop-widgets/divelogexportdialog.h b/desktop-widgets/divelogexportdialog.h index 7e734e6e1..f872487d6 100644 --- a/desktop-widgets/divelogexportdialog.h +++ b/desktop-widgets/divelogexportdialog.h @@ -5,7 +5,6 @@ #include #include #include -#include "core/helpers.h" #include "core/statistics.h" class QAbstractButton; diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index bbaf8dc7f..82ff4db79 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -3,7 +3,7 @@ #include "desktop-widgets/modeldelegates.h" #include "desktop-widgets/mainwindow.h" #include "core/planner.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include "qt-models/cylindermodel.h" diff --git a/desktop-widgets/diveshareexportdialog.cpp b/desktop-widgets/diveshareexportdialog.cpp index 7d4c156aa..c106cdc75 100644 --- a/desktop-widgets/diveshareexportdialog.cpp +++ b/desktop-widgets/diveshareexportdialog.cpp @@ -4,7 +4,7 @@ #include "desktop-widgets/mainwindow.h" #include "core/save-html.h" #include "desktop-widgets/subsurfacewebservices.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/cloudstorage.h" #include diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index b2476d77c..887aaa2a5 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "desktop-widgets/downloadfromdivecomputer.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "desktop-widgets/mainwindow.h" #include "desktop-widgets/divelistview.h" #include "core/display.h" diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp index 13dc89d70..1600556f0 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp @@ -26,7 +26,7 @@ #include "profile-widget/profilewidget2.h" #include "core/pref.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include "ui_socialnetworksdialog.h" diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp index 0738392a5..e4a63ae9e 100644 --- a/desktop-widgets/preferences/preferences_language.cpp +++ b/desktop-widgets/preferences/preferences_language.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "preferences_language.h" #include "ui_preferences_language.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include diff --git a/desktop-widgets/printer.cpp b/desktop-widgets/printer.cpp index 2d1a1d258..64acf81c0 100644 --- a/desktop-widgets/printer.cpp +++ b/desktop-widgets/printer.cpp @@ -2,7 +2,7 @@ #include "printer.h" #include "templatelayout.h" #include "core/statistics.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include #include diff --git a/desktop-widgets/printoptions.cpp b/desktop-widgets/printoptions.cpp index 91099b928..38a670cf8 100644 --- a/desktop-widgets/printoptions.cpp +++ b/desktop-widgets/printoptions.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "printoptions.h" #include "templateedit.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include #include diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index 86b705cfc..0f22ff377 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -13,13 +13,12 @@ #include "core/file.h" #include "desktop-widgets/mainwindow.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "libdivecomputer/parser.h" #include "desktop-widgets/divelistview.h" #include "core/display.h" #include "profile-widget/profilewidget2.h" #include "desktop-widgets/undocommands.h" -#include "core/qthelper.h" #include "core/metadata.h" class MinMaxAvgWidgetPrivate { diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index 2e04ec88d..db0c80832 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "desktop-widgets/subsurfacewebservices.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/webservice.h" #include "desktop-widgets/mainwindow.h" #include "desktop-widgets/usersurvey.h" diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index 18391e7ca..09f180cb1 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -3,7 +3,7 @@ #include "ui_TabDiveInformation.h" #include "../tagwidget.h" -#include +#include #include #include diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp index cc7946a88..55f61eb5a 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp @@ -2,7 +2,7 @@ #include "TabDiveStatistics.h" #include "ui_TabDiveStatistics.h" -#include +#include #include #include diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index c9dccc7ea..62925ee52 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -8,7 +8,7 @@ #include "desktop-widgets/tab-widgets/maintab.h" #include "desktop-widgets/mainwindow.h" #include "desktop-widgets/mapwidget.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/statistics.h" #include "desktop-widgets/modeldelegates.h" #include "qt-models/diveplannermodel.h" diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index 9831bc934..0d6586390 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -3,7 +3,6 @@ #include #include "templatelayout.h" -#include "core/helpers.h" #include "core/display.h" QList grantlee_templates, grantlee_statistics_templates; diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h index 6c3c079e4..2f5b24354 100644 --- a/desktop-widgets/templatelayout.h +++ b/desktop-widgets/templatelayout.h @@ -8,7 +8,6 @@ #include "printoptions.h" #include "core/statistics.h" #include "core/qthelper.h" -#include "core/helpers.h" #include "core/subsurface-qt/DiveObjectHelper.h" int getTotalWork(print_options *printOptions); diff --git a/desktop-widgets/updatemanager.cpp b/desktop-widgets/updatemanager.cpp index f853f3853..db4cd5ecc 100644 --- a/desktop-widgets/updatemanager.cpp +++ b/desktop-widgets/updatemanager.cpp @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include "desktop-widgets/updatemanager.h" -#include "core/helpers.h" #include "core/qthelper.h" #include #include diff --git a/desktop-widgets/usermanual.cpp b/desktop-widgets/usermanual.cpp index 83bffb521..445f3755d 100644 --- a/desktop-widgets/usermanual.cpp +++ b/desktop-widgets/usermanual.cpp @@ -5,7 +5,7 @@ #include "desktop-widgets/usermanual.h" #include "desktop-widgets/mainwindow.h" -#include "core/helpers.h" +#include "core/qthelper.h" SearchBar::SearchBar(QWidget *parent): QWidget(parent) { diff --git a/desktop-widgets/usersurvey.cpp b/desktop-widgets/usersurvey.cpp index dd6d62231..326a51f9e 100644 --- a/desktop-widgets/usersurvey.cpp +++ b/desktop-widgets/usersurvey.cpp @@ -9,7 +9,7 @@ #include "desktop-widgets/subsurfacewebservices.h" #include "desktop-widgets/updatemanager.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurfacesysinfo.h" UserSurvey::UserSurvey(QWidget *parent) : QDialog(parent), diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp index c673037ad..76a3f5097 100644 --- a/map-widget/qmlmapwidgethelper.cpp +++ b/map-widget/qmlmapwidgethelper.cpp @@ -6,7 +6,7 @@ #include "qmlmapwidgethelper.h" #include "core/divesite.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "qt-models/maplocationmodel.h" #define MIN_DISTANCE_BETWEEN_DIVE_SITES_M 50.0 diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 2f1236d76..a8b5c1cdb 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -8,6 +8,7 @@ #include #include #include +#include #include "core/btdiscovery.h" #include "core/gpslocation.h" diff --git a/packaging/ios/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile.pro index 763149242..4df825821 100644 --- a/packaging/ios/Subsurface-mobile.pro +++ b/packaging/ios/Subsurface-mobile.pro @@ -133,7 +133,6 @@ HEADERS += \ ../../core/dive.h \ ../../core/git-access.h \ ../../core/gpslocation.h \ - ../../core/helpers.h \ ../../core/imagedownloader.h \ ../../core/pref.h \ ../../core/profile.h \ diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index 062ed78fc..29a4165b1 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "profile-widget/divecartesianaxis.h" #include "profile-widget/divetextitem.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurface-string.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #ifndef SUBSURFACE_MOBILE diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index 4e7cc0a36..eca2637cf 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -9,7 +9,7 @@ #include "desktop-widgets/preferences/preferencesdialog.h" #endif #include "qt-models/diveplannermodel.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include "libdivecomputer/parser.h" #include "profile-widget/profilewidget2.h" diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 25bff64ea..5a1babb99 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -2,7 +2,7 @@ #include "profile-widget/profilewidget2.h" #include "qt-models/diveplotdatamodel.h" #include "core/subsurface-string.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/profile.h" #include "profile-widget/diveeventitem.h" #include "profile-widget/divetextitem.h" diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index 0892d58eb..19302421e 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -2,7 +2,7 @@ #include "cylindermodel.h" #include "tankinfomodel.h" #include "models.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/color.h" #include "qt-models/diveplannermodel.h" #include "core/gettextfromc.h" diff --git a/qt-models/diveimportedmodel.cpp b/qt-models/diveimportedmodel.cpp index 8a0f4f7c7..d8d486a13 100644 --- a/qt-models/diveimportedmodel.cpp +++ b/qt-models/diveimportedmodel.cpp @@ -1,5 +1,5 @@ #include "diveimportedmodel.h" -#include "core/helpers.h" +#include "core/qthelper.h" DiveImportedModel::DiveImportedModel(QObject *o) : QAbstractTableModel(o), firstIndex(0), diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index b9fb99b1b..23427002a 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "qt-models/divelistmodel.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include DiveListSortModel::DiveListSortModel(QObject *parent) : QSortFilterProxyModel(parent) diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index 87654f1ac..d7988f2d9 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -5,7 +5,6 @@ #include #include -#include "core/helpers.h" #include "core/subsurface-qt/DiveObjectHelper.h" class DiveListSortModel : public QSortFilterProxyModel diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 26a9ff175..2e3cb12a1 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "diveplannermodel.h" #include "core/subsurface-string.h" -#include "core/helpers.h" #include "qt-models/cylindermodel.h" #include "core/planner.h" #include "qt-models/models.h" diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 1e1f1530f..329858b34 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -3,7 +3,7 @@ #include "core/gettextfromc.h" #include "core/metrics.h" #include "core/divelist.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/subsurface-string.h" #include #include diff --git a/qt-models/gpslistmodel.cpp b/qt-models/gpslistmodel.cpp index 231ec04f7..4a4a8feac 100644 --- a/qt-models/gpslistmodel.cpp +++ b/qt-models/gpslistmodel.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "qt-models/gpslistmodel.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include GpsListModel *GpsListModel::m_instance = NULL; diff --git a/qt-models/models.cpp b/qt-models/models.cpp index a0f059165..74abf0533 100644 --- a/qt-models/models.cpp +++ b/qt-models/models.cpp @@ -6,7 +6,7 @@ * */ #include "qt-models/models.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include diff --git a/qt-models/weightmodel.cpp b/qt-models/weightmodel.cpp index 7a2f721dd..de2587adc 100644 --- a/qt-models/weightmodel.cpp +++ b/qt-models/weightmodel.cpp @@ -3,7 +3,7 @@ #include "core/subsurface-string.h" #include "core/gettextfromc.h" #include "core/metrics.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "qt-models/weightsysteminfomodel.h" WeightModel::WeightModel(QObject *parent) : CleanerTableModel(parent), diff --git a/qt-models/yearlystatisticsmodel.cpp b/qt-models/yearlystatisticsmodel.cpp index a4a67aec7..9cbb19a1d 100644 --- a/qt-models/yearlystatisticsmodel.cpp +++ b/qt-models/yearlystatisticsmodel.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "qt-models/yearlystatisticsmodel.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/metrics.h" #include "core/statistics.h" diff --git a/subsurface-desktop-helper.cpp b/subsurface-desktop-helper.cpp index 6e33f5692..d633c93ab 100644 --- a/subsurface-desktop-helper.cpp +++ b/subsurface-desktop-helper.cpp @@ -3,7 +3,7 @@ /* Qt UI implementation */ #include "core/display.h" #include "desktop-widgets/mainwindow.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include "core/pluginmanager.h" #include diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index 5fe83acd9..933d667bc 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -2,7 +2,7 @@ /* qt-gui.cpp */ /* Qt UI implementation */ #include "core/display.h" -#include "core/helpers.h" +#include "core/qthelper.h" #include #include diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index 131e1d493..26b8336cc 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -10,7 +10,6 @@ #include "core/subsurfacestartup.h" #include "core/color.h" #include "core/qthelper.h" -#include "core/helpers.h" #include "core/downloadfromdcthread.h" #include