mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
Merge pull request #15142 from Chocobo1/warning
Use proper signed number type
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
class AsyncFileStorage : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(AsyncFileStorage)
|
||||
Q_DISABLE_COPY_MOVE(AsyncFileStorage)
|
||||
|
||||
public:
|
||||
explicit AsyncFileStorage(const QString &storageFolderPath, QObject *parent = nullptr);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
class BandwidthScheduler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(BandwidthScheduler)
|
||||
Q_DISABLE_COPY_MOVE(BandwidthScheduler)
|
||||
|
||||
public:
|
||||
explicit BandwidthScheduler(QObject *parent = nullptr);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace BitTorrent
|
||||
{
|
||||
class BencodeResumeDataStorage::Worker final : public QObject
|
||||
{
|
||||
Q_DISABLE_COPY(Worker)
|
||||
Q_DISABLE_COPY_MOVE(Worker)
|
||||
|
||||
public:
|
||||
explicit Worker(const QDir &resumeDataDir);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace BitTorrent
|
||||
class BencodeResumeDataStorage final : public ResumeDataStorage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(BencodeResumeDataStorage)
|
||||
Q_DISABLE_COPY_MOVE(BencodeResumeDataStorage)
|
||||
|
||||
public:
|
||||
explicit BencodeResumeDataStorage(const QString &path, QObject *parent = nullptr);
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace BitTorrent
|
||||
{
|
||||
class DBResumeDataStorage::Worker final : public QObject
|
||||
{
|
||||
Q_DISABLE_COPY(Worker)
|
||||
Q_DISABLE_COPY_MOVE(Worker)
|
||||
|
||||
public:
|
||||
Worker(const QString &dbPath, const QString &dbConnectionName);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BitTorrent
|
||||
class DBResumeDataStorage final : public ResumeDataStorage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DBResumeDataStorage)
|
||||
Q_DISABLE_COPY_MOVE(DBResumeDataStorage)
|
||||
|
||||
public:
|
||||
explicit DBResumeDataStorage(const QString &dbPath, QObject *parent = nullptr);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BitTorrent
|
||||
class FileSearcher final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(FileSearcher)
|
||||
Q_DISABLE_COPY_MOVE(FileSearcher)
|
||||
|
||||
public:
|
||||
FileSearcher() = default;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
class PortForwarderImpl final : public Net::PortForwarder
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(PortForwarderImpl)
|
||||
Q_DISABLE_COPY_MOVE(PortForwarderImpl)
|
||||
|
||||
public:
|
||||
explicit PortForwarderImpl(lt::session *provider, QObject *parent = nullptr);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace BitTorrent
|
||||
class ResumeDataStorage : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(ResumeDataStorage)
|
||||
Q_DISABLE_COPY_MOVE(ResumeDataStorage)
|
||||
|
||||
public:
|
||||
using QObject::QObject;
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace BitTorrent
|
||||
class Session : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Session)
|
||||
Q_DISABLE_COPY_MOVE(Session)
|
||||
|
||||
public:
|
||||
static void initInstance();
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace BitTorrent
|
||||
class Statistics : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Statistics)
|
||||
Q_DISABLE_COPY_MOVE(Statistics)
|
||||
|
||||
public:
|
||||
explicit Statistics(BitTorrent::Session *session);
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace
|
||||
QString firstTrackerMessage;
|
||||
QString firstErrorMessage;
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const size_t numEndpoints = nativeEntry.endpoints.size() * ((hashes.has_v1() && hashes.has_v2()) ? 2 : 1);
|
||||
const auto numEndpoints = static_cast<qsizetype>(nativeEntry.endpoints.size() * ((hashes.has_v1() && hashes.has_v2()) ? 2 : 1));
|
||||
trackerEntry.endpoints.reserve(static_cast<decltype(trackerEntry.endpoints)::size_type>(numEndpoints));
|
||||
for (const lt::announce_endpoint &endpoint : nativeEntry.endpoints)
|
||||
{
|
||||
@@ -167,8 +167,8 @@ namespace
|
||||
}
|
||||
}
|
||||
#else
|
||||
const int numEndpoints = nativeEntry.endpoints.size();
|
||||
trackerEntry.endpoints.reserve(numEndpoints);
|
||||
const auto numEndpoints = static_cast<qsizetype>(nativeEntry.endpoints.size());
|
||||
trackerEntry.endpoints.reserve(static_cast<decltype(trackerEntry.endpoints)::size_type>(numEndpoints));
|
||||
for (const lt::announce_endpoint &endpoint : nativeEntry.endpoints)
|
||||
{
|
||||
TrackerEntry::EndpointStats trackerEndpoint;
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace BitTorrent
|
||||
|
||||
class TorrentImpl final : public QObject, public Torrent
|
||||
{
|
||||
Q_DISABLE_COPY(TorrentImpl)
|
||||
Q_DISABLE_COPY_MOVE(TorrentImpl)
|
||||
Q_DECLARE_TR_FUNCTIONS(BitTorrent::TorrentImpl)
|
||||
|
||||
public:
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace BitTorrent
|
||||
class Tracker final : public QObject, public Http::IRequestHandler, private Http::ResponseBuilder
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Tracker)
|
||||
Q_DISABLE_COPY_MOVE(Tracker)
|
||||
|
||||
struct TrackerAnnounceRequest;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Http
|
||||
class Connection : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Connection)
|
||||
Q_DISABLE_COPY_MOVE(Connection)
|
||||
|
||||
public:
|
||||
Connection(QTcpSocket *socket, IRequestHandler *requestHandler, QObject *parent = nullptr);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Http
|
||||
class Server final : public QTcpServer
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Server)
|
||||
Q_DISABLE_COPY_MOVE(Server)
|
||||
|
||||
public:
|
||||
explicit Server(IRequestHandler *requestHandler, QObject *parent = nullptr);
|
||||
|
||||
@@ -35,7 +35,7 @@ class QString;
|
||||
|
||||
class IconProvider : public QObject
|
||||
{
|
||||
Q_DISABLE_COPY(IconProvider)
|
||||
Q_DISABLE_COPY_MOVE(IconProvider)
|
||||
|
||||
public:
|
||||
static void initInstance();
|
||||
|
||||
@@ -72,7 +72,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Log::MsgTypes)
|
||||
class Logger : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Logger)
|
||||
Q_DISABLE_COPY_MOVE(Logger)
|
||||
|
||||
public:
|
||||
static void initInstance();
|
||||
|
||||
@@ -39,7 +39,7 @@ class QUrl;
|
||||
class DownloadHandlerImpl final : public Net::DownloadHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DownloadHandlerImpl)
|
||||
Q_DISABLE_COPY_MOVE(DownloadHandlerImpl)
|
||||
|
||||
public:
|
||||
DownloadHandlerImpl(Net::DownloadManager *manager, const Net::DownloadRequest &downloadRequest);
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace Net
|
||||
class DownloadHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DownloadHandler)
|
||||
Q_DISABLE_COPY_MOVE(DownloadHandler)
|
||||
|
||||
public:
|
||||
using QObject::QObject;
|
||||
@@ -112,7 +112,7 @@ namespace Net
|
||||
class DownloadManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DownloadManager)
|
||||
Q_DISABLE_COPY_MOVE(DownloadManager)
|
||||
|
||||
public:
|
||||
static void initInstance();
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Net
|
||||
class GeoIPManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(GeoIPManager)
|
||||
Q_DISABLE_COPY_MOVE(GeoIPManager)
|
||||
|
||||
public:
|
||||
static void initInstance();
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Net
|
||||
{
|
||||
class PortForwarder : public QObject
|
||||
{
|
||||
Q_DISABLE_COPY(PortForwarder)
|
||||
Q_DISABLE_COPY_MOVE(PortForwarder)
|
||||
|
||||
public:
|
||||
explicit PortForwarder(QObject *parent = nullptr);
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Net
|
||||
class ProxyConfigurationManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(ProxyConfigurationManager)
|
||||
Q_DISABLE_COPY_MOVE(ProxyConfigurationManager)
|
||||
|
||||
explicit ProxyConfigurationManager(QObject *parent = nullptr);
|
||||
~ProxyConfigurationManager() = default;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Net
|
||||
class ReverseResolution : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(ReverseResolution)
|
||||
Q_DISABLE_COPY_MOVE(ReverseResolution)
|
||||
|
||||
public:
|
||||
explicit ReverseResolution(QObject *parent = nullptr);
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace DNS
|
||||
class Preferences : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Preferences)
|
||||
Q_DISABLE_COPY_MOVE(Preferences)
|
||||
|
||||
Preferences();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace RSS
|
||||
class Article : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Article)
|
||||
Q_DISABLE_COPY_MOVE(Article)
|
||||
|
||||
friend class Feed;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace RSS
|
||||
class AutoDownloader final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(AutoDownloader)
|
||||
Q_DISABLE_COPY_MOVE(AutoDownloader)
|
||||
|
||||
friend class ::Application;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace RSS
|
||||
class Feed final : public Item
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Feed)
|
||||
Q_DISABLE_COPY_MOVE(Feed)
|
||||
|
||||
friend class Session;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace RSS
|
||||
class Folder final : public Item
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Folder)
|
||||
Q_DISABLE_COPY_MOVE(Folder)
|
||||
|
||||
friend class Session;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace RSS
|
||||
class Item : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Item)
|
||||
Q_DISABLE_COPY_MOVE(Item)
|
||||
|
||||
friend class Folder;
|
||||
friend class Session;
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace RSS
|
||||
class Session : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Session)
|
||||
Q_DISABLE_COPY_MOVE(Session)
|
||||
|
||||
friend class ::Application;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class SearchPluginManager;
|
||||
class SearchDownloadHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SearchDownloadHandler)
|
||||
Q_DISABLE_COPY_MOVE(SearchDownloadHandler)
|
||||
|
||||
friend class SearchPluginManager;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class SearchPluginManager;
|
||||
class SearchHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SearchHandler)
|
||||
Q_DISABLE_COPY_MOVE(SearchHandler)
|
||||
|
||||
friend class SearchPluginManager;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class SearchHandler;
|
||||
class SearchPluginManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SearchPluginManager)
|
||||
Q_DISABLE_COPY_MOVE(SearchPluginManager)
|
||||
|
||||
public:
|
||||
SearchPluginManager();
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace
|
||||
class TorrentFilesWatcher::Worker final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Worker)
|
||||
Q_DISABLE_COPY_MOVE(Worker)
|
||||
|
||||
public:
|
||||
Worker();
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BitTorrent
|
||||
class TorrentFilesWatcher final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(TorrentFilesWatcher)
|
||||
Q_DISABLE_COPY_MOVE(TorrentFilesWatcher)
|
||||
|
||||
public:
|
||||
struct WatchedFolderOptions
|
||||
|
||||
Reference in New Issue
Block a user