Skip to content

Commit

Permalink
Remove unused includes
Browse files Browse the repository at this point in the history
  • Loading branch information
strseb committed Dec 6, 2024
1 parent f4d97af commit 77b99df
Show file tree
Hide file tree
Showing 23 changed files with 15 additions and 59 deletions.
4 changes: 3 additions & 1 deletion src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion src/apppermission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "i18nstrings.h"
#include "leakdetector.h"
#include "logger.h"
#include "mozillavpn.h"
#include "platforms/dummy/dummyapplistprovider.h"
#include "settingsholder.h"

Expand Down
4 changes: 3 additions & 1 deletion src/collator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 0 additions & 21 deletions src/commands/commandui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <QQmlDebuggingEnabler>
Expand Down Expand Up @@ -80,10 +62,7 @@
#ifdef MZ_WINDOWS
# include <windows.h>

# include <iostream>

# include "eventlistener.h"
# include "platforms/windows/windowsappimageprovider.h"
# include "platforms/windows/windowsstartatbootwatcher.h"
#endif

Expand Down
1 change: 0 additions & 1 deletion src/connectionhealth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 0 additions & 3 deletions src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#include <QNetworkInformation>

#include "app.h"
#include "apppermission.h"
#include "captiveportal/captiveportal.h"
#include "constants.h"
#include "controllerimpl.h"
#include "dnshelper.h"
Expand All @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions src/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
#include <QObject>
#include <QTimer>

#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
Expand Down
5 changes: 0 additions & 5 deletions src/dnshelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
#include <QHostAddress>

#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 {
Expand Down
2 changes: 0 additions & 2 deletions src/inspector/inspectorhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/localizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions src/mozillavpn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/mozillavpn.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "app.h"
#include "authenticationlistener.h"
#include "errorhandler.h"
#include "frontend/navigator.h"

struct MozillaVPNPrivate;
Expand Down
7 changes: 5 additions & 2 deletions src/networkwatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "logger.h"
#include "mozillavpn.h"
#include "networkwatcherimpl.h"
#include "platforms/dummy/dummynetworkwatcher.h"
#include "settingsholder.h"

#ifdef MZ_WINDOWS
Expand All @@ -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;
Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/profileflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
#include <QJsonDocument>
#include <QJsonObject>

#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"
Expand Down
2 changes: 0 additions & 2 deletions src/purchasehandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <QObject>

#include "productshandler.h"

class PurchaseHandler : public QObject {
Q_OBJECT
Q_DISABLE_COPY_MOVE(PurchaseHandler)
Expand Down
1 change: 1 addition & 0 deletions src/purchaseiaphandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <QObject>

#include "productshandler.h"
#include "purchasehandler.h"

class PurchaseIAPHandler : public PurchaseHandler {
Expand Down
1 change: 0 additions & 1 deletion src/purchasewebhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "purchasewebhandler.h"

#include "authenticationlistener.h"
#include "constants.h"
#include "leakdetector.h"
#include "logger.h"
#include "mozillavpn.h"
Expand Down
1 change: 0 additions & 1 deletion src/qmlengineholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions src/settingsholder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#include <QObject>
#include <QVariant>

#include "constants.h"
#include "feature/feature.h"
// Used in the ettingslist.h
#include "constants.h" // IWYU pragma: keep
#include "feature/feature.h" // IWYU pragma: keep
#include "settings/setting.h"
#include "settings/settingsmanager.h"

Expand Down
1 change: 0 additions & 1 deletion src/subscriptionmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <QCoreApplication>

#include "constants.h"
#include "controller.h"
#include "leakdetector.h"
#include "logger.h"
Expand Down
1 change: 0 additions & 1 deletion src/systemtraynotificationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "constants.h"
#include "controller.h"
#include "frontend/navigator.h"
#include "i18nstrings.h"
#include "leakdetector.h"
#include "logger.h"
Expand Down
4 changes: 0 additions & 4 deletions src/telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/webextensiontelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "glean/generated/pings.h"
#include "glean/quantity.h"
#include "logger.h"
#include "settingsholder.h"

namespace {
Logger logger("WebExtensionTelemetry");
Expand Down

0 comments on commit 77b99df

Please sign in to comment.