mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
Add final specifier to classes
This allow compilers to generate more efficient code.
This commit is contained in:
parent
2681093d27
commit
d3d3f7dbb3
15 changed files with 19 additions and 19 deletions
|
@ -68,7 +68,7 @@ namespace RSS
|
|||
class AutoDownloader;
|
||||
}
|
||||
|
||||
class Application : public BaseApplication
|
||||
class Application final : public BaseApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Application)
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
namespace QtLP_Private
|
||||
{
|
||||
class QtLockedFile : public QFile
|
||||
class QtLockedFile final : public QFile
|
||||
{
|
||||
public:
|
||||
enum LockMode
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
class QDataStream;
|
||||
|
||||
class FilterParserThread : public QThread
|
||||
class FilterParserThread final : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <libtorrent/extensions.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
class NativeSessionExtension : public lt::plugin
|
||||
class NativeSessionExtension final : public lt::plugin
|
||||
{
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10200)
|
||||
lt::feature_flags_t implemented_features() override;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <libtorrent/torrent_handle.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
class NativeTorrentExtension : public lt::torrent_plugin
|
||||
class NativeTorrentExtension final : public lt::torrent_plugin
|
||||
{
|
||||
public:
|
||||
explicit NativeTorrentExtension(const lt::torrent_handle &torrentHandle);
|
||||
|
|
|
@ -44,7 +44,7 @@ using LTPortMapping = int;
|
|||
using LTPortMapping = lt::port_mapping_t;
|
||||
#endif
|
||||
|
||||
class PortForwarderImpl : public Net::PortForwarder
|
||||
class PortForwarderImpl final : public Net::PortForwarder
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(PortForwarderImpl)
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace BitTorrent
|
|||
QStringList urlSeeds;
|
||||
};
|
||||
|
||||
class TorrentCreatorThread : public QThread
|
||||
class TorrentCreatorThread final : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace BitTorrent
|
|||
// *Basic* Bittorrent tracker implementation
|
||||
// [BEP-3] The BitTorrent Protocol Specification
|
||||
// also see: https://wiki.theory.org/index.php/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol
|
||||
class Tracker : public QObject, public Http::IRequestHandler, private Http::ResponseBuilder
|
||||
class Tracker final : public QObject, public Http::IRequestHandler, private Http::ResponseBuilder
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Tracker)
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Http
|
|||
class IRequestHandler;
|
||||
class Connection;
|
||||
|
||||
class Server : public QTcpServer
|
||||
class Server final : public QTcpServer
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Server)
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace
|
|||
// Disguise as Firefox to avoid web server banning
|
||||
const char DEFAULT_USER_AGENT[] = "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0";
|
||||
|
||||
class NetworkCookieJar : public QNetworkCookieJar
|
||||
class NetworkCookieJar final : public QNetworkCookieJar
|
||||
{
|
||||
public:
|
||||
explicit NetworkCookieJar(QObject *parent = nullptr)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
class QObject;
|
||||
class QUrl;
|
||||
|
||||
class DownloadHandlerImpl : public Net::DownloadHandler
|
||||
class DownloadHandlerImpl final : public Net::DownloadHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DownloadHandlerImpl)
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Private
|
|||
};
|
||||
|
||||
/// Default implementation. Takes paths from system
|
||||
class DefaultProfile : public Profile
|
||||
class DefaultProfile final : public Profile
|
||||
{
|
||||
public:
|
||||
explicit DefaultProfile(const QString &configurationName);
|
||||
|
@ -86,7 +86,7 @@ namespace Private
|
|||
};
|
||||
|
||||
/// Custom tree: creates directories under the specified root directory
|
||||
class CustomProfile : public Profile
|
||||
class CustomProfile final : public Profile
|
||||
{
|
||||
public:
|
||||
CustomProfile(const QString &rootPath, const QString &configurationName);
|
||||
|
@ -114,14 +114,14 @@ namespace Private
|
|||
virtual ~PathConverter() = default;
|
||||
};
|
||||
|
||||
class NoConvertConverter : public PathConverter
|
||||
class NoConvertConverter final : public PathConverter
|
||||
{
|
||||
public:
|
||||
QString toPortablePath(const QString &path) const override;
|
||||
QString fromPortablePath(const QString &portablePath) const override;
|
||||
};
|
||||
|
||||
class Converter : public PathConverter
|
||||
class Converter final : public PathConverter
|
||||
{
|
||||
public:
|
||||
explicit Converter(const QString &basePath);
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
class XmlStreamEntityResolver : public QXmlStreamEntityResolver
|
||||
class XmlStreamEntityResolver final : public QXmlStreamEntityResolver
|
||||
{
|
||||
public:
|
||||
QString resolveUndeclaredEntity(const QString &name) override
|
||||
|
|
|
@ -36,7 +36,7 @@ class QStringList;
|
|||
|
||||
class FileSystemWatcher;
|
||||
|
||||
class ScanFoldersModel : public QAbstractListModel
|
||||
class ScanFoldersModel final : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(ScanFoldersModel)
|
||||
|
|
|
@ -50,7 +50,7 @@ class WebApplication;
|
|||
|
||||
constexpr char C_SID[] = "SID"; // name of session id cookie
|
||||
|
||||
class WebSession : public ISession
|
||||
class WebSession final : public ISession
|
||||
{
|
||||
public:
|
||||
explicit WebSession(const QString &sid);
|
||||
|
@ -69,7 +69,7 @@ private:
|
|||
QVariantHash m_data;
|
||||
};
|
||||
|
||||
class WebApplication
|
||||
class WebApplication final
|
||||
: public QObject, public Http::IRequestHandler, public ISessionManager
|
||||
, private Http::ResponseBuilder
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue