Merge pull request #10752 from thalieht/fw-declare

Forward declare and remove some unused #include
This commit is contained in:
Mike Tzou
2019-06-06 10:18:26 +08:00
committed by GitHub
89 changed files with 110 additions and 131 deletions

View File

@@ -33,10 +33,11 @@
#include <QVector>
#include "../tristatebool.h"
#include "downloadpriority.h"
namespace BitTorrent
{
enum class DownloadPriority;
struct AddTorrentParams
{
QString name;

View File

@@ -28,6 +28,8 @@
#include "peerinfo.h"
#include <QBitArray>
#include "base/bittorrent/torrenthandle.h"
#include "base/net/geoipmanager.h"
#include "base/unicodestrings.h"

View File

@@ -31,10 +31,11 @@
#include <libtorrent/peer_info.hpp>
#include <QBitArray>
#include <QCoreApplication>
#include <QHostAddress>
class QBitArray;
namespace BitTorrent
{
class TorrentHandle;

View File

@@ -29,7 +29,6 @@
#include "resumedatasavingmanager.h"
#include <QByteArray>
#include <QDebug>
#include <QSaveFile>
#include "base/logger.h"

View File

@@ -43,7 +43,6 @@
#include "base/global.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
namespace

View File

@@ -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"

View File

@@ -45,7 +45,6 @@
#include <QVector>
#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;

View File

@@ -30,7 +30,6 @@
#define BITTORRENT_TRACKERENTRY_H
#include <libtorrent/announce_entry.hpp>
#include <libtorrent/torrent_info.hpp>
class QString;

View File

@@ -37,11 +37,9 @@
#endif
#include "base/algorithm.h"
#include "base/bittorrent/magneturi.h"
#include "base/bittorrent/torrentinfo.h"
#include "base/global.h"
#include "base/logger.h"
#include "base/preferences.h"
#include "base/utils/fs.h"
namespace

View File

@@ -34,13 +34,12 @@
#include <QElapsedTimer>
#include <QObject>
#include "types.h"
class QTcpSocket;
namespace Http
{
class IRequestHandler;
struct Response;
class Connection : public QObject
{

View File

@@ -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:

View File

@@ -31,6 +31,7 @@
#include <QDateTime>
#include "base/http/types.h"
#include "base/utils/gzip.h"
QByteArray Http::toByteArray(Response response)

View File

@@ -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);

View File

@@ -32,7 +32,6 @@
#include <QHash>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QObject>
#include <QQueue>
#include <QSet>

View File

@@ -30,7 +30,6 @@
#include "geoipmanager.h"
#include <QDateTime>
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QHostAddress>

View File

@@ -30,7 +30,6 @@
#ifndef NET_GEOIPMANAGER_H
#define NET_GEOIPMANAGER_H
#include <QCache>
#include <QObject>
class QHostAddress;

View File

@@ -32,7 +32,6 @@
#include <QHostAddress>
#include <QVariant>
#include "base/types.h"
#include "geoipdatabase.h"
namespace

View File

@@ -36,7 +36,6 @@
#include <QAbstractSocket>
#include <QByteArray>
#include <QHash>
#include <QMetaType>
#include <QObject>
#include <QString>

View File

@@ -59,7 +59,6 @@
#include "global.h"
#include "settingsstorage.h"
#include "utils/fs.h"
#include "utils/misc.h"
Preferences *Preferences::m_instance = nullptr;

View File

@@ -31,13 +31,13 @@
#define PREFERENCES_H
#include <QList>
#include <QStringList>
#include "base/utils/net.h"
class QDateTime;
class QNetworkCookie;
class QSize;
class QStringList;
class QTime;
class QVariant;

View File

@@ -35,6 +35,7 @@
#include <QSettings>
class QString;
class Application;
namespace Private

View File

@@ -30,7 +30,6 @@
#include <QDataStream>
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>

View File

@@ -40,6 +40,7 @@
class QThread;
class QTimer;
class Application;
class AsyncFileStorage;
struct ProcessingJob;

View File

@@ -32,7 +32,6 @@
#include <algorithm>
#include <QDebug>
#include <QDir>
#include <QHash>
#include <QJsonArray>
#include <QJsonObject>

View File

@@ -35,6 +35,7 @@
class QDateTime;
class QJsonObject;
class QRegularExpression;
class TriStateBool;
namespace RSS

View File

@@ -31,14 +31,12 @@
#include "rss_session.h"
#include <QDebug>
#include <QDir>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>
#include <QSaveFile>
#include <QString>
#include <QThread>
#include <QVariantHash>
#include "../asyncfilestorage.h"
#include "../global.h"

View File

@@ -68,6 +68,7 @@
#include <QTimer>
class QThread;
class Application;
class AsyncFileStorage;

View File

@@ -33,6 +33,7 @@
#include <QList>
class QStringList;
class FileSystemWatcher;
class ScanFoldersModel : public QAbstractListModel

View File

@@ -31,6 +31,7 @@
#include <QObject>
class QProcess;
class SearchPluginManager;
class SearchDownloadHandler : public QObject

View File

@@ -31,7 +31,6 @@
#include <memory>
#include <QDebug>
#include <QDir>
#include <QDirIterator>
#include <QDomDocument>

View File

@@ -49,7 +49,6 @@
#include <unistd.h>
#endif
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QDirIterator>

View File

@@ -37,6 +37,7 @@
#endif
class QString;
enum class ShutdownDialogAction;
/* Miscellaneous functions that can be useful */

View File

@@ -37,7 +37,6 @@
#include "bytearray.h"
#include "random.h"
#include "string.h"
namespace Utils
{

View File

@@ -31,7 +31,8 @@
#define UTILS_STRING_H
#include <QLatin1String>
#include <QString>
class QString;
class TriStateBool;