From 2385f48c6a74e6eb39b3c8c69766719c05768113 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sat, 8 Sep 2018 19:46:11 +0200 Subject: [PATCH] core/settings ... : remove qPref* includes in qPref.h reduce number of includes by removing qPref* includes in qPref.h Signed-off-by: Jan Iversen --- core/cloudstorage.cpp | 2 +- core/settings/qPref.cpp | 14 ++++++++++++++ core/settings/qPref.h | 15 --------------- desktop-widgets/mainwindow.cpp | 5 ++++- .../preferences/preferences_defaults.cpp | 4 +++- .../preferences/preferences_network.cpp | 3 ++- desktop-widgets/subsurfacewebservices.cpp | 2 +- mobile-widgets/qmlmanager.cpp | 6 ++++-- mobile-widgets/qmlprefs.cpp | 1 - mobile-widgets/qmlprefs.h | 3 ++- subsurface-mobile-main.cpp | 1 + tests/testparseperformance.cpp | 3 ++- tests/testqPrefCloudStorage.cpp | 2 +- tests/testqPrefDisplay.cpp | 2 +- tests/testqPrefDiveComputer.cpp | 2 +- tests/testqPrefDivePlanner.cpp | 2 +- tests/testqPrefFacebook.cpp | 2 +- tests/testqPrefGeneral.cpp | 2 +- tests/testqPrefGeocoding.cpp | 2 +- tests/testqPrefLanguage.cpp | 2 +- tests/testqPrefLocationService.cpp | 2 +- tests/testqPrefPartialPressureGas.cpp | 2 +- tests/testqPrefProxy.cpp | 2 +- tests/testqPrefTechnicalDetails.cpp | 2 +- tests/testqPrefUnits.cpp | 2 +- tests/testqPrefUpdateManager.cpp | 2 +- 26 files changed, 48 insertions(+), 39 deletions(-) diff --git a/core/cloudstorage.cpp b/core/cloudstorage.cpp index 001e0acdf..39d9a4d66 100644 --- a/core/cloudstorage.cpp +++ b/core/cloudstorage.cpp @@ -2,7 +2,7 @@ #include "cloudstorage.h" #include "pref.h" #include "qthelper.h" -#include "settings/qPref.h" +#include "settings/qPrefCloudStorage.h" #include CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) : diff --git a/core/settings/qPref.cpp b/core/settings/qPref.cpp index 2a455b4fd..2d3c53a40 100644 --- a/core/settings/qPref.cpp +++ b/core/settings/qPref.cpp @@ -1,6 +1,20 @@ // SPDX-License-Identifier: GPL-2.0 #include "qPref.h" #include "qPrefPrivate.h" +#include "qPrefCloudStorage.h" +#include "qPrefDisplay.h" +#include "qPrefDiveComputer.h" +#include "qPrefDivePlanner.h" +#include "qPrefFacebook.h" +#include "qPrefGeneral.h" +#include "qPrefGeocoding.h" +#include "qPrefLanguage.h" +#include "qPrefLocationService.h" +#include "qPrefPartialPressureGas.h" +#include "qPrefProxy.h" +#include "qPrefTechnicalDetails.h" +#include "qPrefUnit.h" +#include "qPrefUpdateManager.h" #include #include diff --git a/core/settings/qPref.h b/core/settings/qPref.h index f13a29274..e59a778e5 100644 --- a/core/settings/qPref.h +++ b/core/settings/qPref.h @@ -7,21 +7,6 @@ #include #include -#include "qPrefCloudStorage.h" -#include "qPrefDisplay.h" -#include "qPrefDiveComputer.h" -#include "qPrefDivePlanner.h" -#include "qPrefFacebook.h" -#include "qPrefGeneral.h" -#include "qPrefGeocoding.h" -#include "qPrefLanguage.h" -#include "qPrefLocationService.h" -#include "qPrefPartialPressureGas.h" -#include "qPrefProxy.h" -#include "qPrefTechnicalDetails.h" -#include "qPrefUnit.h" -#include "qPrefUpdateManager.h" - class qPref : public QObject { Q_OBJECT Q_PROPERTY(QString canonical_version READ canonical_version); diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index d83a2aa16..1028a0f7c 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -47,7 +47,10 @@ #include "core/windowtitleupdate.h" #include "desktop-widgets/locationinformation.h" #include "preferences/preferencesdialog.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefPartialPressureGas.h" +#include "core/settings/qPrefTechnicalDetails.h" +#include "core/settings/qPrefCloudStorage.h" +#include "core/settings/qPrefDisplay.h" #ifndef NO_USERMANUAL #include "usermanual.h" diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp index 1f96a79cf..9cdaeb43f 100644 --- a/desktop-widgets/preferences/preferences_defaults.cpp +++ b/desktop-widgets/preferences/preferences_defaults.cpp @@ -2,7 +2,9 @@ #include "preferences_defaults.h" #include "ui_preferences_defaults.h" #include "core/dive.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefGeneral.h" +#include "core/settings/qPrefDisplay.h" +#include "core/settings/qPrefCloudStorage.h" #include diff --git a/desktop-widgets/preferences/preferences_network.cpp b/desktop-widgets/preferences/preferences_network.cpp index 112bc936f..c81588eea 100644 --- a/desktop-widgets/preferences/preferences_network.cpp +++ b/desktop-widgets/preferences/preferences_network.cpp @@ -4,7 +4,8 @@ #include "subsurfacewebservices.h" #include "core/cloudstorage.h" #include "core/dive.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefCloudStorage.h" +#include "core/settings/qPrefProxy.h" #include PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":preferences-system-network-icon"), 9), ui(new Ui::PreferencesNetwork()) diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index 1f35be6c0..b3084da14 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -2,7 +2,7 @@ #include "desktop-widgets/subsurfacewebservices.h" #include "core/qthelper.h" #include "core/webservice.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefCloudStorage.h" #include "desktop-widgets/mainwindow.h" #include "desktop-widgets/usersurvey.h" #include "core/divelist.h" diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 90fdded5b..2a3c426ed 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -33,9 +33,11 @@ #include "core/downloadfromdcthread.h" #include "core/subsurface-string.h" #include "core/pref.h" -#include "core/settings/qPref.h" - #include "core/ssrf.h" +#include "core/settings/qPrefGeneral.h" +#include "core/settings/qPrefLocationService.h" +#include "core/settings/qPrefTechnicalDetails.h" +#include "core/settings/qPrefPartialPressureGas.h" QMLManager *QMLManager::m_instance = NULL; bool noCloudToCloud = false; diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp index 8fd6811c8..99bde2426 100644 --- a/mobile-widgets/qmlprefs.cpp +++ b/mobile-widgets/qmlprefs.cpp @@ -3,7 +3,6 @@ #include "qmlmanager.h" #include "core/membuffer.h" -#include "core/settings/qPref.h" #include "core/gpslocation.h" diff --git a/mobile-widgets/qmlprefs.h b/mobile-widgets/qmlprefs.h index 1676c2e64..ed38c0530 100644 --- a/mobile-widgets/qmlprefs.h +++ b/mobile-widgets/qmlprefs.h @@ -3,7 +3,8 @@ #define QMLPREFS_H #include -#include "core/settings/qPref.h" +#include "core/settings/qPrefCloudStorage.h" +#include "core/settings/qPrefDisplay.h" class QMLPrefs : public QObject { diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index e700455f3..a9e4b424d 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -12,6 +12,7 @@ #include "core/qthelper.h" #include "core/subsurfacestartup.h" #include "core/settings/qPref.h" +#include "core/settings/qPrefDisplay.h" #include #include diff --git a/tests/testparseperformance.cpp b/tests/testparseperformance.cpp index c31304f42..b7b032f38 100644 --- a/tests/testparseperformance.cpp +++ b/tests/testparseperformance.cpp @@ -3,7 +3,8 @@ #include "core/dive.h" #include "core/divelist.h" #include "core/git-access.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefProxy.h" +#include "core/settings/qPrefCloudStorage.h" #include #include #include diff --git a/tests/testqPrefCloudStorage.cpp b/tests/testqPrefCloudStorage.cpp index 7e67966b3..3a20babea 100644 --- a/tests/testqPrefCloudStorage.cpp +++ b/tests/testqPrefCloudStorage.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefCloudStorage.h" #include diff --git a/tests/testqPrefDisplay.cpp b/tests/testqPrefDisplay.cpp index cf111f6e3..d0a7d1321 100644 --- a/tests/testqPrefDisplay.cpp +++ b/tests/testqPrefDisplay.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefDisplay.h" #include #include diff --git a/tests/testqPrefDiveComputer.cpp b/tests/testqPrefDiveComputer.cpp index 5a26ffdac..b7b1c1dd7 100644 --- a/tests/testqPrefDiveComputer.cpp +++ b/tests/testqPrefDiveComputer.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefDiveComputer.h" #include diff --git a/tests/testqPrefDivePlanner.cpp b/tests/testqPrefDivePlanner.cpp index a33033766..d5339737d 100644 --- a/tests/testqPrefDivePlanner.cpp +++ b/tests/testqPrefDivePlanner.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefDivePlanner.h" #include diff --git a/tests/testqPrefFacebook.cpp b/tests/testqPrefFacebook.cpp index ef39d704c..ebb2e4f02 100644 --- a/tests/testqPrefFacebook.cpp +++ b/tests/testqPrefFacebook.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "testqPrefFacebook.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefFacebook.h" #include "core/pref.h" #include "core/qthelper.h" diff --git a/tests/testqPrefGeneral.cpp b/tests/testqPrefGeneral.cpp index c26616e90..fc364e78c 100644 --- a/tests/testqPrefGeneral.cpp +++ b/tests/testqPrefGeneral.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefGeneral.h" #include diff --git a/tests/testqPrefGeocoding.cpp b/tests/testqPrefGeocoding.cpp index d7c311474..882a2b919 100644 --- a/tests/testqPrefGeocoding.cpp +++ b/tests/testqPrefGeocoding.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefGeocoding.h" #include diff --git a/tests/testqPrefLanguage.cpp b/tests/testqPrefLanguage.cpp index 3f6db017e..1db5c53b1 100644 --- a/tests/testqPrefLanguage.cpp +++ b/tests/testqPrefLanguage.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefLanguage.h" #include diff --git a/tests/testqPrefLocationService.cpp b/tests/testqPrefLocationService.cpp index 3c0d33fc3..fbd374a4b 100644 --- a/tests/testqPrefLocationService.cpp +++ b/tests/testqPrefLocationService.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefLocationService.h" #include diff --git a/tests/testqPrefPartialPressureGas.cpp b/tests/testqPrefPartialPressureGas.cpp index 5e5c090ab..a98b1c2e0 100644 --- a/tests/testqPrefPartialPressureGas.cpp +++ b/tests/testqPrefPartialPressureGas.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefPartialPressureGas.h" #include diff --git a/tests/testqPrefProxy.cpp b/tests/testqPrefProxy.cpp index 921565d2f..089fb5a41 100644 --- a/tests/testqPrefProxy.cpp +++ b/tests/testqPrefProxy.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefProxy.h" #include diff --git a/tests/testqPrefTechnicalDetails.cpp b/tests/testqPrefTechnicalDetails.cpp index 328541102..0cbc73b0e 100644 --- a/tests/testqPrefTechnicalDetails.cpp +++ b/tests/testqPrefTechnicalDetails.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefTechnicalDetails.h" #include diff --git a/tests/testqPrefUnits.cpp b/tests/testqPrefUnits.cpp index 5291afa14..6e54808cb 100644 --- a/tests/testqPrefUnits.cpp +++ b/tests/testqPrefUnits.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefUnit.h" #include diff --git a/tests/testqPrefUpdateManager.cpp b/tests/testqPrefUpdateManager.cpp index 4dc3c2696..4d274d553 100644 --- a/tests/testqPrefUpdateManager.cpp +++ b/tests/testqPrefUpdateManager.cpp @@ -3,7 +3,7 @@ #include "core/pref.h" #include "core/qthelper.h" -#include "core/settings/qPref.h" +#include "core/settings/qPrefUpdateManager.h" #include