diff --git a/src/base/bittorrent/addtorrentparams.h b/src/base/bittorrent/addtorrentparams.h index 42a837019..59aa3a42b 100644 --- a/src/base/bittorrent/addtorrentparams.h +++ b/src/base/bittorrent/addtorrentparams.h @@ -33,10 +33,11 @@ #include #include "../tristatebool.h" -#include "downloadpriority.h" namespace BitTorrent { + enum class DownloadPriority; + struct AddTorrentParams { QString name; diff --git a/src/base/bittorrent/peerinfo.cpp b/src/base/bittorrent/peerinfo.cpp index 8e4277e4b..82f8982ff 100644 --- a/src/base/bittorrent/peerinfo.cpp +++ b/src/base/bittorrent/peerinfo.cpp @@ -28,6 +28,8 @@ #include "peerinfo.h" +#include + #include "base/bittorrent/torrenthandle.h" #include "base/net/geoipmanager.h" #include "base/unicodestrings.h" diff --git a/src/base/bittorrent/peerinfo.h b/src/base/bittorrent/peerinfo.h index 6fb3114af..a0741743d 100644 --- a/src/base/bittorrent/peerinfo.h +++ b/src/base/bittorrent/peerinfo.h @@ -31,10 +31,11 @@ #include -#include #include #include +class QBitArray; + namespace BitTorrent { class TorrentHandle; diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index f11e5e15c..d807212ea 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -59,6 +59,7 @@ #include "base/profile.h" #include "base/tristatebool.h" #include "base/utils/fs.h" +#include "downloadpriority.h" #include "peerinfo.h" #include "session.h" #include "trackerentry.h" diff --git a/src/base/bittorrent/torrenthandle.h b/src/base/bittorrent/torrenthandle.h index 4eaf94482..4513d805e 100644 --- a/src/base/bittorrent/torrenthandle.h +++ b/src/base/bittorrent/torrenthandle.h @@ -45,7 +45,6 @@ #include #include "private/speedmonitor.h" -#include "downloadpriority.h" #include "infohash.h" #include "torrentinfo.h" @@ -58,6 +57,7 @@ class QUrl; namespace BitTorrent { + enum class DownloadPriority; class PeerInfo; class Session; class TrackerEntry; diff --git a/src/base/http/connection.h b/src/base/http/connection.h index 4304a9ee5..926d4e44a 100644 --- a/src/base/http/connection.h +++ b/src/base/http/connection.h @@ -34,13 +34,12 @@ #include #include -#include "types.h" - class QTcpSocket; namespace Http { class IRequestHandler; + struct Response; class Connection : public QObject { diff --git a/src/base/http/irequesthandler.h b/src/base/http/irequesthandler.h index 0d2cf9a5c..99e6cf574 100644 --- a/src/base/http/irequesthandler.h +++ b/src/base/http/irequesthandler.h @@ -29,10 +29,12 @@ #ifndef HTTP_IREQUESTHANDLER_H #define HTTP_IREQUESTHANDLER_H -#include "types.h" - namespace Http { + struct Environment; + struct Request; + struct Response; + class IRequestHandler { public: diff --git a/src/base/http/responsegenerator.cpp b/src/base/http/responsegenerator.cpp index 21d9e42c4..90ee498d5 100644 --- a/src/base/http/responsegenerator.cpp +++ b/src/base/http/responsegenerator.cpp @@ -31,6 +31,7 @@ #include +#include "base/http/types.h" #include "base/utils/gzip.h" QByteArray Http::toByteArray(Response response) diff --git a/src/base/http/responsegenerator.h b/src/base/http/responsegenerator.h index b7b8e8985..81dcac3a2 100644 --- a/src/base/http/responsegenerator.h +++ b/src/base/http/responsegenerator.h @@ -31,10 +31,13 @@ #ifndef HTTP_RESPONSEGENERATOR_H #define HTTP_RESPONSEGENERATOR_H -#include "types.h" +class QByteArray; +class QString; namespace Http { + struct Response; + QByteArray toByteArray(Response response); QString httpDate(); void compressContent(Response &response); diff --git a/src/base/preferences.h b/src/base/preferences.h index 26ed99dbc..9252a0bdb 100644 --- a/src/base/preferences.h +++ b/src/base/preferences.h @@ -31,13 +31,13 @@ #define PREFERENCES_H #include -#include #include "base/utils/net.h" class QDateTime; class QNetworkCookie; class QSize; +class QStringList; class QTime; class QVariant; diff --git a/src/base/utils/string.h b/src/base/utils/string.h index c5cf43c78..5ad1bfbad 100644 --- a/src/base/utils/string.h +++ b/src/base/utils/string.h @@ -31,8 +31,8 @@ #define UTILS_STRING_H #include -#include +class QString; class TriStateBool; namespace Utils diff --git a/src/gui/autoexpandabledialog.h b/src/gui/autoexpandabledialog.h index 73f2cdbad..692e62587 100644 --- a/src/gui/autoexpandabledialog.h +++ b/src/gui/autoexpandabledialog.h @@ -31,7 +31,8 @@ #include #include -#include + +class QString; namespace Ui { diff --git a/src/gui/categoryfiltermodel.h b/src/gui/categoryfiltermodel.h index 2fd058fb0..f4f550e7a 100644 --- a/src/gui/categoryfiltermodel.h +++ b/src/gui/categoryfiltermodel.h @@ -30,15 +30,15 @@ #define CATEGORYFILTERMODEL_H #include -#include + +class QModelIndex; +class CategoryModelItem; namespace BitTorrent { class TorrentHandle; } -class CategoryModelItem; - class CategoryFilterModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/gui/categoryfilterproxymodel.h b/src/gui/categoryfilterproxymodel.h index ef6c2e7a5..9e5ee360b 100644 --- a/src/gui/categoryfilterproxymodel.h +++ b/src/gui/categoryfilterproxymodel.h @@ -30,7 +30,8 @@ #define CATEGORYFILTERPROXYMODEL_H #include -#include + +class QString; class CategoryFilterProxyModel : public QSortFilterProxyModel { diff --git a/src/gui/fspathedit_p.cpp b/src/gui/fspathedit_p.cpp index 71c7e30a2..4153e1787 100644 --- a/src/gui/fspathedit_p.cpp +++ b/src/gui/fspathedit_p.cpp @@ -29,8 +29,11 @@ #include "fspathedit_p.h" #include +#include #include #include +#include +#include #include #include diff --git a/src/gui/fspathedit_p.h b/src/gui/fspathedit_p.h index 21c553eb0..66029d676 100644 --- a/src/gui/fspathedit_p.h +++ b/src/gui/fspathedit_p.h @@ -29,20 +29,19 @@ #ifndef QBT_GUI_FSPATHEDIT_P_H #define QBT_GUI_FSPATHEDIT_P_H -#include #include -#include -#include #include -#include -#include #include -#include -#include #include #include +class QAction; +class QCompleter; +class QContextMenuEvent; +class QFileSystemModel; +class QKeyEvent; class QStringList; +class QStringRef; namespace Private { diff --git a/src/gui/properties/downloadedpiecesbar.h b/src/gui/properties/downloadedpiecesbar.h index ee96d45b5..38bb603b9 100644 --- a/src/gui/properties/downloadedpiecesbar.h +++ b/src/gui/properties/downloadedpiecesbar.h @@ -31,10 +31,11 @@ #include #include -#include #include "piecesbar.h" +class QWidget; + class DownloadedPiecesBar : public PiecesBar { using base = PiecesBar; diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index b6e60dd06..07209d963 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -29,6 +29,7 @@ #include "propertieswidget.h" #include +#include #include #include #include diff --git a/src/gui/properties/trackerlistwidget.cpp b/src/gui/properties/trackerlistwidget.cpp index 34d732dae..0caa12ecf 100644 --- a/src/gui/properties/trackerlistwidget.cpp +++ b/src/gui/properties/trackerlistwidget.cpp @@ -30,12 +30,14 @@ #include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/src/gui/properties/trackerlistwidget.h b/src/gui/properties/trackerlistwidget.h index 8fcde45eb..7ea25d4fd 100644 --- a/src/gui/properties/trackerlistwidget.h +++ b/src/gui/properties/trackerlistwidget.h @@ -29,13 +29,13 @@ #ifndef TRACKERLIST_H #define TRACKERLIST_H -#include #include -#include #include #include "propertieswidget.h" +class QShortcut; + #define NB_STICKY_ITEM 3 namespace BitTorrent diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp index 7f2e33f26..2ca6f8d6a 100644 --- a/src/gui/rss/rsswidget.cpp +++ b/src/gui/rss/rsswidget.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/src/gui/rss/rsswidget.h b/src/gui/rss/rsswidget.h index 6bd150eb9..a4e693f0c 100644 --- a/src/gui/rss/rsswidget.h +++ b/src/gui/rss/rsswidget.h @@ -32,8 +32,9 @@ #define RSSWIDGET_H #include -#include +#include +class QShortcut; class ArticleListWidget; class FeedListWidget; class QListWidgetItem; diff --git a/src/gui/search/searchsortmodel.cpp b/src/gui/search/searchsortmodel.cpp index fcc9e0000..e83e9e753 100644 --- a/src/gui/search/searchsortmodel.cpp +++ b/src/gui/search/searchsortmodel.cpp @@ -29,6 +29,7 @@ #include "searchsortmodel.h" #include "base/global.h" +#include "base/utils/string.h" SearchSortModel::SearchSortModel(QObject *parent) : base(parent) diff --git a/src/gui/search/searchsortmodel.h b/src/gui/search/searchsortmodel.h index 6434b3dcd..50f782c49 100644 --- a/src/gui/search/searchsortmodel.h +++ b/src/gui/search/searchsortmodel.h @@ -31,7 +31,6 @@ #include #include -#include "base/utils/string.h" class SearchSortModel : public QSortFilterProxyModel { diff --git a/src/gui/tagfiltermodel.h b/src/gui/tagfiltermodel.h index 19451bf94..1dd8fd38b 100644 --- a/src/gui/tagfiltermodel.h +++ b/src/gui/tagfiltermodel.h @@ -30,17 +30,17 @@ #define TAGFILTERMODEL_H #include -#include #include #include +class QModelIndex; +class TagModelItem; + namespace BitTorrent { class TorrentHandle; } -class TagModelItem; - class TagFilterModel : public QAbstractListModel { Q_OBJECT diff --git a/src/gui/tagfilterproxymodel.h b/src/gui/tagfilterproxymodel.h index 6bb83f457..93b75b585 100644 --- a/src/gui/tagfilterproxymodel.h +++ b/src/gui/tagfilterproxymodel.h @@ -30,7 +30,8 @@ #define TAGFILTERPROXYMODEL_H #include -#include + +class QString; class TagFilterProxyModel : public QSortFilterProxyModel { diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index bc336e3aa..902ef34bb 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -49,6 +49,7 @@ #endif #include "base/bittorrent/downloadpriority.h" +#include "base/bittorrent/torrentinfo.h" #include "base/global.h" #include "base/utils/fs.h" #include "base/utils/misc.h" diff --git a/src/gui/torrentcontentmodel.h b/src/gui/torrentcontentmodel.h index fda753aad..7d02189d4 100644 --- a/src/gui/torrentcontentmodel.h +++ b/src/gui/torrentcontentmodel.h @@ -30,16 +30,20 @@ #define TORRENTCONTENTMODEL_H #include -#include -#include #include -#include "base/bittorrent/torrentinfo.h" #include "torrentcontentmodelitem.h" class QFileIconProvider; +class QModelIndex; +class QVariant; class TorrentContentModelFile; +namespace BitTorrent +{ + class TorrentInfo; +} + class TorrentContentModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/gui/torrentcontentmodelfile.h b/src/gui/torrentcontentmodelfile.h index ff972c4b5..61d663d82 100644 --- a/src/gui/torrentcontentmodelfile.h +++ b/src/gui/torrentcontentmodelfile.h @@ -29,9 +29,13 @@ #ifndef TORRENTCONTENTMODELFILE_H #define TORRENTCONTENTMODELFILE_H -#include "base/bittorrent/downloadpriority.h" #include "torrentcontentmodelitem.h" +namespace BitTorrent +{ + enum class DownloadPriority; +} + class TorrentContentModelFile : public TorrentContentModelItem { public: diff --git a/src/gui/torrentcontentmodelfolder.h b/src/gui/torrentcontentmodelfolder.h index 6e41ef269..a8dfcf3b0 100644 --- a/src/gui/torrentcontentmodelfolder.h +++ b/src/gui/torrentcontentmodelfolder.h @@ -29,9 +29,13 @@ #ifndef TORRENTCONTENTMODELFOLDER_H #define TORRENTCONTENTMODELFOLDER_H -#include "base/bittorrent/downloadpriority.h" #include "torrentcontentmodelitem.h" +namespace BitTorrent +{ + enum class DownloadPriority; +} + class TorrentContentModelFolder : public TorrentContentModelItem { public: diff --git a/src/gui/torrentcontentmodelitem.h b/src/gui/torrentcontentmodelitem.h index 84e55afb8..49d0516a0 100644 --- a/src/gui/torrentcontentmodelitem.h +++ b/src/gui/torrentcontentmodelitem.h @@ -30,10 +30,10 @@ #define TORRENTCONTENTMODELITEM_H #include -#include #include "base/bittorrent/downloadpriority.h" +class QVariant; class TorrentContentModelFolder; class TorrentContentModelItem diff --git a/src/webui/api/apicontroller.h b/src/webui/api/apicontroller.h index 419d6c390..be620832a 100644 --- a/src/webui/api/apicontroller.h +++ b/src/webui/api/apicontroller.h @@ -31,9 +31,10 @@ #include #include #include -#include #include +class QString; + struct ISessionManager; using StringMap = QMap; using DataMap = QMap; diff --git a/src/webui/api/isessionmanager.h b/src/webui/api/isessionmanager.h index 9d77dcdb1..1917f803d 100644 --- a/src/webui/api/isessionmanager.h +++ b/src/webui/api/isessionmanager.h @@ -28,9 +28,10 @@ #pragma once -#include #include +class QString; + struct ISession { virtual ~ISession() = default; diff --git a/src/webui/api/searchcontroller.cpp b/src/webui/api/searchcontroller.cpp index 0c2597aa2..37491b4cd 100644 --- a/src/webui/api/searchcontroller.cpp +++ b/src/webui/api/searchcontroller.cpp @@ -28,6 +28,8 @@ #include "searchcontroller.h" +#include +#include #include #include "base/global.h" @@ -37,6 +39,7 @@ #include "base/utils/random.h" #include "base/utils/string.h" #include "apierror.h" +#include "isessionmanager.h" class SearchPluginManager; diff --git a/src/webui/api/searchcontroller.h b/src/webui/api/searchcontroller.h index 38cdc40f5..c2accaefc 100644 --- a/src/webui/api/searchcontroller.h +++ b/src/webui/api/searchcontroller.h @@ -29,15 +29,15 @@ #pragma once #include -#include -#include #include -#include #include "base/search/searchpluginmanager.h" #include "apicontroller.h" -#include "isessionmanager.h" +class QJsonArray; +class QJsonObject; +class QStringList; +struct ISession; struct SearchResult; class SearchController : public APIController