mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
Use default constructor, destructor
This commit is contained in:
@@ -338,7 +338,7 @@ TorrentImpl::TorrentImpl(SessionImpl *session, lt::session *nativeSession
|
||||
// == END UPGRADE CODE ==
|
||||
}
|
||||
|
||||
TorrentImpl::~TorrentImpl() {}
|
||||
TorrentImpl::~TorrentImpl() = default;
|
||||
|
||||
bool TorrentImpl::isValid() const
|
||||
{
|
||||
|
||||
@@ -66,12 +66,6 @@ TorrentInfo::TorrentInfo(const lt::torrent_info &nativeInfo)
|
||||
}
|
||||
}
|
||||
|
||||
TorrentInfo::TorrentInfo(const TorrentInfo &other)
|
||||
: m_nativeInfo {other.m_nativeInfo}
|
||||
, m_nativeIndexes {other.m_nativeIndexes}
|
||||
{
|
||||
}
|
||||
|
||||
TorrentInfo &TorrentInfo::operator=(const TorrentInfo &other)
|
||||
{
|
||||
if (this != &other)
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BitTorrent
|
||||
|
||||
public:
|
||||
TorrentInfo() = default;
|
||||
TorrentInfo(const TorrentInfo &other);
|
||||
TorrentInfo(const TorrentInfo &other) = default;
|
||||
|
||||
explicit TorrentInfo(const lt::torrent_info &nativeInfo);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Http
|
||||
class IRequestHandler
|
||||
{
|
||||
public:
|
||||
virtual ~IRequestHandler() {}
|
||||
virtual ~IRequestHandler() = default;
|
||||
virtual Response processRequest(const Request &request, const Environment &env) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -75,10 +75,6 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
RequestParser::RequestParser()
|
||||
{
|
||||
}
|
||||
|
||||
RequestParser::ParseResult RequestParser::parse(const QByteArray &data)
|
||||
{
|
||||
// Warning! Header names are converted to lowercase
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Http
|
||||
static const long MAX_CONTENT_SIZE = 64 * 1024 * 1024; // 64 MB
|
||||
|
||||
private:
|
||||
RequestParser();
|
||||
RequestParser() = default;
|
||||
|
||||
ParseResult doParse(const QByteArray &data);
|
||||
bool parseStartLines(QStringView data);
|
||||
|
||||
@@ -36,8 +36,6 @@ IconProvider::IconProvider(QObject *parent)
|
||||
{
|
||||
}
|
||||
|
||||
IconProvider::~IconProvider() {}
|
||||
|
||||
void IconProvider::initInstance()
|
||||
{
|
||||
if (!m_instance)
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit IconProvider(QObject *parent = nullptr);
|
||||
~IconProvider();
|
||||
~IconProvider() = default;
|
||||
|
||||
static IconProvider *m_instance;
|
||||
};
|
||||
|
||||
@@ -208,12 +208,9 @@ AutoDownloadRule::AutoDownloadRule(const QString &name)
|
||||
setName(name);
|
||||
}
|
||||
|
||||
AutoDownloadRule::AutoDownloadRule(const AutoDownloadRule &other)
|
||||
: m_dataPtr(other.m_dataPtr)
|
||||
{
|
||||
}
|
||||
AutoDownloadRule::AutoDownloadRule(const AutoDownloadRule &other) = default;
|
||||
|
||||
AutoDownloadRule::~AutoDownloadRule() {}
|
||||
AutoDownloadRule::~AutoDownloadRule() = default;
|
||||
|
||||
QRegularExpression AutoDownloadRule::cachedRegex(const QString &expression, const bool isRegex) const
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace RSS
|
||||
class AutoDownloadRule
|
||||
{
|
||||
public:
|
||||
explicit AutoDownloadRule(const QString &name = u""_qs);
|
||||
explicit AutoDownloadRule(const QString &name = {});
|
||||
AutoDownloadRule(const AutoDownloadRule &other);
|
||||
~AutoDownloadRule();
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace RSS
|
||||
friend bool operator==(const AutoDownloadRule &left, const AutoDownloadRule &right);
|
||||
|
||||
QJsonObject toJsonObject() const;
|
||||
static AutoDownloadRule fromJsonObject(const QJsonObject &jsonObj, const QString &name = u""_qs);
|
||||
static AutoDownloadRule fromJsonObject(const QJsonObject &jsonObj, const QString &name = {});
|
||||
|
||||
QVariantHash toLegacyDict() const;
|
||||
static AutoDownloadRule fromLegacyDict(const QVariantHash &dict);
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace RSS
|
||||
|
||||
friend class Session;
|
||||
|
||||
explicit Folder(const QString &path = u""_qs);
|
||||
explicit Folder(const QString &path = {});
|
||||
~Folder() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -45,8 +45,6 @@ Item::Item(const QString &path)
|
||||
{
|
||||
}
|
||||
|
||||
Item::~Item() {}
|
||||
|
||||
void Item::setPath(const QString &path)
|
||||
{
|
||||
if (path != m_path)
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace RSS
|
||||
|
||||
protected:
|
||||
explicit Item(const QString &path);
|
||||
~Item() override;
|
||||
~Item() override = default;
|
||||
|
||||
virtual void cleanup() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user