diff --git a/src/app.cpp b/src/app.cpp index 7b05cc9597..0329196aa5 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -8,7 +8,9 @@ #include "leakdetector.h" #include "logger.h" -#include "settings/settingsmanager.h" +#if QT_VERSION < QT_VERSION_CHECK(6, 2, 4) +# include "settings/settingsmanager.h" +#endif #include "settingsholder.h" #include "taskscheduler.h" diff --git a/src/apppermission.cpp b/src/apppermission.cpp index a9b570ae9f..054e5c580a 100644 --- a/src/apppermission.cpp +++ b/src/apppermission.cpp @@ -12,7 +12,6 @@ #include "i18nstrings.h" #include "leakdetector.h" #include "logger.h" -#include "mozillavpn.h" #include "platforms/dummy/dummyapplistprovider.h" #include "settingsholder.h" diff --git a/src/collator.cpp b/src/collator.cpp index 1abbb1f56f..7d91dacafa 100644 --- a/src/collator.cpp +++ b/src/collator.cpp @@ -4,7 +4,9 @@ #include "collator.h" -#include "localizer.h" +#if defined(MZ_WASM) +# include "localizer.h" +#endif #ifdef MZ_IOS # include "platforms/ios/ioscommons.h" diff --git a/src/commands/commandui.cpp b/src/commands/commandui.cpp index 1ce8b180e2..cb4cee3fe9 100644 --- a/src/commands/commandui.cpp +++ b/src/commands/commandui.cpp @@ -13,44 +13,26 @@ #include "accessiblenotification.h" #include "addons/manager/addonmanager.h" #include "apppermission.h" -#include "captiveportal/captiveportaldetection.h" #include "commandlineparser.h" -#include "connectionhealth.h" #include "constants.h" #include "controller.h" #include "daemon/mock/mockdaemon.h" -#include "feature/feature.h" #include "fontloader.h" -#include "glean/generated/metrics.h" #include "glean/generated/pings.h" #include "glean/mzglean.h" #include "i18nstrings.h" #include "imageproviderfactory.h" #include "inspector/inspectorhandler.h" -#include "ipaddresslookup.h" #include "keyregenerator.h" #include "leakdetector.h" #include "logger.h" -#include "models/devicemodel.h" -#include "models/recentconnections.h" -#include "models/recommendedlocationmodel.h" #include "models/servercountrymodel.h" -#include "models/subscriptiondata.h" -#include "models/supportcategorymodel.h" -#include "models/user.h" #include "mozillavpn.h" -#include "networkrequest.h" #include "notificationhandler.h" -#include "productshandler.h" -#include "profileflow.h" -#include "purchasehandler.h" #include "qmlengineholder.h" -#include "releasemonitor.h" -#include "serverlatency.h" #include "settingsholder.h" #include "telemetry.h" #include "temporarydir.h" -#include "update/updater.h" #ifdef MZ_DEBUG # include @@ -80,10 +62,7 @@ #ifdef MZ_WINDOWS # include -# include - # include "eventlistener.h" -# include "platforms/windows/windowsappimageprovider.h" # include "platforms/windows/windowsstartatbootwatcher.h" #endif diff --git a/src/connectionhealth.cpp b/src/connectionhealth.cpp index b3fbc6f9c7..a475909e96 100644 --- a/src/connectionhealth.cpp +++ b/src/connectionhealth.cpp @@ -14,7 +14,6 @@ #include "glean/generated/metrics.h" #include "leakdetector.h" #include "logger.h" -#include "models/server.h" #include "mozillavpn.h" #include "settingsholder.h" diff --git a/src/controller.cpp b/src/controller.cpp index 23c86c00d9..27bd9a1f80 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -8,8 +8,6 @@ #include #include "app.h" -#include "apppermission.h" -#include "captiveportal/captiveportal.h" #include "constants.h" #include "controllerimpl.h" #include "dnshelper.h" @@ -34,7 +32,6 @@ #include "settingsholder.h" #include "tasks/controlleraction/taskcontrolleraction.h" #include "tasks/function/taskfunction.h" -#include "tasks/heartbeat/taskheartbeat.h" #include "taskscheduler.h" #if defined(MZ_FLATPAK) diff --git a/src/controller.h b/src/controller.h index a059fb877e..b7c9bc2d4c 100644 --- a/src/controller.h +++ b/src/controller.h @@ -10,18 +10,15 @@ #include #include -#include "controller.h" #include "interfaceconfig.h" #include "ipaddress.h" #include "loghandler.h" #include "models/server.h" #include "models/serverdata.h" -#include "mozillavpn.h" #include "pinghelper.h" class Controller; class ControllerImpl; -class MozillaVPN; class Controller : public QObject, public LogSerializer { Q_OBJECT diff --git a/src/dnshelper.cpp b/src/dnshelper.cpp index 91525e850c..0a7634d27e 100644 --- a/src/dnshelper.cpp +++ b/src/dnshelper.cpp @@ -7,12 +7,7 @@ #include #include "feature/feature.h" -#include "ipaddress.h" #include "logger.h" -#include "rfc/rfc1918.h" -#include "rfc/rfc4193.h" -#include "rfc/rfc4291.h" -#include "rfc/rfc5735.h" #include "settingsholder.h" namespace { diff --git a/src/inspector/inspectorhandler.cpp b/src/inspector/inspectorhandler.cpp index f44807549b..cff2769ee6 100644 --- a/src/inspector/inspectorhandler.cpp +++ b/src/inspector/inspectorhandler.cpp @@ -38,8 +38,6 @@ #include "localizer.h" #include "logger.h" #include "loghandler.h" -#include "models/subscriptiondata.h" -#include "mozillavpn.h" #include "mzglean.h" #include "networkmanager.h" #include "qmlengineholder.h" diff --git a/src/localizer.cpp b/src/localizer.cpp index fff297b5a6..2f6c8f9ff0 100644 --- a/src/localizer.cpp +++ b/src/localizer.cpp @@ -16,7 +16,6 @@ #include "constants.h" #include "glean/generated/metrics.h" -#include "glean/mzglean.h" #include "i18nlanguagenames.h" #include "i18nstrings.h" #include "leakdetector.h" diff --git a/src/mozillavpn.cpp b/src/mozillavpn.cpp index 956ec2bc3c..fc9cc530c8 100644 --- a/src/mozillavpn.cpp +++ b/src/mozillavpn.cpp @@ -19,13 +19,11 @@ #include "glean/generated/metrics.h" #include "glean/generated/pings.h" #include "glean/mzglean.h" -#include "i18nstrings.h" #include "inspector/inspectorhandler.h" #include "leakdetector.h" #include "localizer.h" #include "logger.h" #include "loghandler.h" -#include "logoutobserver.h" #include "models/device.h" #include "models/devicemodel.h" #include "models/keys.h" diff --git a/src/mozillavpn.h b/src/mozillavpn.h index 6c5e9bfc09..85b039b1a7 100644 --- a/src/mozillavpn.h +++ b/src/mozillavpn.h @@ -12,7 +12,6 @@ #include "app.h" #include "authenticationlistener.h" -#include "errorhandler.h" #include "frontend/navigator.h" struct MozillaVPNPrivate; diff --git a/src/networkwatcher.cpp b/src/networkwatcher.cpp index f3721fa801..81b10dcd5c 100644 --- a/src/networkwatcher.cpp +++ b/src/networkwatcher.cpp @@ -13,7 +13,6 @@ #include "logger.h" #include "mozillavpn.h" #include "networkwatcherimpl.h" -#include "platforms/dummy/dummynetworkwatcher.h" #include "settingsholder.h" #ifdef MZ_WINDOWS @@ -39,6 +38,10 @@ # include "platforms/ios/iosnetworkwatcher.h" #endif +#ifdef UNIT_TEST +# include "platforms/dummy/dummynetworkwatcher.h" +#endif + // How often we notify the same unsecured network #ifndef UNIT_TEST constexpr uint32_t NETWORK_WATCHER_TIMER_MSEC = 20000; @@ -67,7 +70,7 @@ void NetworkWatcher::initialize() { m_impl = new AndroidNetworkWatcher(this); #elif defined(MZ_IOS) m_impl = new IOSNetworkWatcher(this); -#else +#elif defined(UNIT_TEST) m_impl = new DummyNetworkWatcher(this); #endif diff --git a/src/profileflow.cpp b/src/profileflow.cpp index e910bd0095..3d135e8670 100644 --- a/src/profileflow.cpp +++ b/src/profileflow.cpp @@ -7,10 +7,8 @@ #include #include -#include "glean/generated/metrics.h" #include "leakdetector.h" #include "logger.h" -#include "models/subscriptiondata.h" #include "mozillavpn.h" #include "tasks/getsubscriptiondetails/taskgetsubscriptiondetails.h" #include "taskscheduler.h" diff --git a/src/purchasehandler.h b/src/purchasehandler.h index e1eebf71e1..ffdffaf020 100644 --- a/src/purchasehandler.h +++ b/src/purchasehandler.h @@ -7,8 +7,6 @@ #include -#include "productshandler.h" - class PurchaseHandler : public QObject { Q_OBJECT Q_DISABLE_COPY_MOVE(PurchaseHandler) diff --git a/src/purchaseiaphandler.h b/src/purchaseiaphandler.h index e1d2c898fd..5bbd86c50c 100644 --- a/src/purchaseiaphandler.h +++ b/src/purchaseiaphandler.h @@ -7,6 +7,7 @@ #include +#include "productshandler.h" #include "purchasehandler.h" class PurchaseIAPHandler : public PurchaseHandler { diff --git a/src/purchasewebhandler.cpp b/src/purchasewebhandler.cpp index 8677fa2fbb..b5e18317d2 100644 --- a/src/purchasewebhandler.cpp +++ b/src/purchasewebhandler.cpp @@ -5,7 +5,6 @@ #include "purchasewebhandler.h" #include "authenticationlistener.h" -#include "constants.h" #include "leakdetector.h" #include "logger.h" #include "mozillavpn.h" diff --git a/src/qmlengineholder.cpp b/src/qmlengineholder.cpp index c089631cf9..40c016e025 100644 --- a/src/qmlengineholder.cpp +++ b/src/qmlengineholder.cpp @@ -17,7 +17,6 @@ #include "frontend/navigator.h" #include "glean/generated/metrics.h" #include "glean/generated/pings.h" -#include "glean/mzglean.h" #include "leakdetector.h" #include "localizer.h" #include "loghandler.h" diff --git a/src/settingsholder.h b/src/settingsholder.h index e43dbd6fad..6af20a95bb 100644 --- a/src/settingsholder.h +++ b/src/settingsholder.h @@ -9,8 +9,9 @@ #include #include -#include "constants.h" -#include "feature/feature.h" +// Used in the settingslist.h +#include "constants.h" // IWYU pragma: keep +#include "feature/feature.h" // IWYU pragma: keep #include "settings/setting.h" #include "settings/settingsmanager.h" diff --git a/src/subscriptionmonitor.cpp b/src/subscriptionmonitor.cpp index 600e808c0b..8c952b5d6d 100644 --- a/src/subscriptionmonitor.cpp +++ b/src/subscriptionmonitor.cpp @@ -6,7 +6,6 @@ #include -#include "constants.h" #include "controller.h" #include "leakdetector.h" #include "logger.h" diff --git a/src/systemtraynotificationhandler.cpp b/src/systemtraynotificationhandler.cpp index 29f2a0e94e..aa0b81503c 100644 --- a/src/systemtraynotificationhandler.cpp +++ b/src/systemtraynotificationhandler.cpp @@ -11,7 +11,6 @@ #include "constants.h" #include "controller.h" -#include "frontend/navigator.h" #include "i18nstrings.h" #include "leakdetector.h" #include "logger.h" diff --git a/src/telemetry.cpp b/src/telemetry.cpp index fca466706d..d41c536f99 100644 --- a/src/telemetry.cpp +++ b/src/telemetry.cpp @@ -5,8 +5,6 @@ #include "telemetry.h" #include "apppermission.h" -#include "connectionhealth.h" -#include "constants.h" #include "controller.h" #include "dnshelper.h" #include "feature/feature.h" @@ -15,8 +13,6 @@ #include "leakdetector.h" #include "logger.h" #include "mozillavpn.h" -#include "networkwatcher.h" -#include "purchasehandler.h" #include "settingsholder.h" #if defined(MZ_ANDROID) diff --git a/src/webextensiontelemetry.cpp b/src/webextensiontelemetry.cpp index 7e2b547e66..8e19d0e94e 100644 --- a/src/webextensiontelemetry.cpp +++ b/src/webextensiontelemetry.cpp @@ -15,7 +15,6 @@ #include "glean/generated/pings.h" #include "glean/quantity.h" #include "logger.h" -#include "settingsholder.h" namespace { Logger logger("WebExtensionTelemetry");