mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 06:32:29 -06:00
Use uniform initialization on some default arguments
This commit is contained in:
@@ -43,7 +43,7 @@ namespace BitTorrent
|
||||
class MagnetUri
|
||||
{
|
||||
public:
|
||||
explicit MagnetUri(const QString &source = QString());
|
||||
explicit MagnetUri(const QString &source = {});
|
||||
|
||||
bool isValid() const;
|
||||
InfoHash hash() const;
|
||||
|
||||
@@ -581,7 +581,7 @@ namespace BitTorrent
|
||||
|
||||
bool addTorrent_impl(CreateTorrentParams params, const MagnetUri &magnetUri,
|
||||
TorrentInfo torrentInfo = TorrentInfo(),
|
||||
const QByteArray &fastresumeData = QByteArray());
|
||||
const QByteArray &fastresumeData = {});
|
||||
bool findIncompleteFiles(TorrentInfo &torrentInfo, QString &savePath) const;
|
||||
|
||||
void updateSeedingLimitTimer();
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace BitTorrent
|
||||
typedef boost::shared_ptr<const libtorrent::torrent_info> NativeConstPtr;
|
||||
typedef boost::shared_ptr<libtorrent::torrent_info> NativePtr;
|
||||
|
||||
explicit TorrentInfo(NativeConstPtr nativeInfo = NativeConstPtr());
|
||||
explicit TorrentInfo(NativeConstPtr nativeInfo = {});
|
||||
TorrentInfo(const TorrentInfo &other);
|
||||
|
||||
static TorrentInfo load(const QByteArray &data, QString *error = nullptr) noexcept;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
static Logger *instance();
|
||||
|
||||
void addMessage(const QString &message, const Log::MsgType &type = Log::NORMAL);
|
||||
void addPeer(const QString &ip, bool blocked, const QString &reason = QString());
|
||||
void addPeer(const QString &ip, bool blocked, const QString &reason = {});
|
||||
QVector<Log::Msg> getMessages(int lastKnownId = -1) const;
|
||||
QVector<Log::Peer> getPeers(int lastKnownId = -1) const;
|
||||
|
||||
|
||||
@@ -90,13 +90,13 @@ namespace Net
|
||||
AuthCramMD5
|
||||
};
|
||||
|
||||
QByteArray encodeMimeHeader(const QString &key, const QString &value, QTextCodec *latin1, const QByteArray &prefix = QByteArray());
|
||||
QByteArray encodeMimeHeader(const QString &key, const QString &value, QTextCodec *latin1, const QByteArray &prefix = {});
|
||||
void ehlo();
|
||||
void helo();
|
||||
void parseEhloResponse(const QByteArray &code, bool continued, const QString &line);
|
||||
void authenticate();
|
||||
void startTLS();
|
||||
void authCramMD5(const QByteArray &challenge = QByteArray());
|
||||
void authCramMD5(const QByteArray &challenge = {});
|
||||
void authPlain();
|
||||
void authLogin();
|
||||
void logError(const QString &msg);
|
||||
|
||||
@@ -83,7 +83,7 @@ class Preferences : public QObject
|
||||
|
||||
Preferences();
|
||||
|
||||
const QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
|
||||
const QVariant value(const QString &key, const QVariant &defaultValue = {}) const;
|
||||
void setValue(const QString &key, const QVariant &value);
|
||||
|
||||
static Preferences *m_instance;
|
||||
|
||||
@@ -70,8 +70,8 @@ public:
|
||||
|
||||
static QString pathTypeDisplayName(PathType type);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int rowCount(const QModelIndex &parent = {}) const;
|
||||
int columnCount(const QModelIndex &parent = {}) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
static void freeInstance();
|
||||
static SettingsStorage *instance();
|
||||
|
||||
QVariant loadValue(const QString &key, const QVariant &defaultValue = QVariant()) const;
|
||||
QVariant loadValue(const QString &key, const QVariant &defaultValue = {}) const;
|
||||
void storeValue(const QString &key, const QVariant &value);
|
||||
void removeValue(const QString &key);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ template <typename T> class CachedSettingValue;
|
||||
class FileGuard
|
||||
{
|
||||
public:
|
||||
explicit FileGuard(const QString &path = QString());
|
||||
explicit FileGuard(const QString &path = {});
|
||||
~FileGuard();
|
||||
|
||||
/// Cancels or re-enables deferred file deletion
|
||||
@@ -55,7 +55,7 @@ class TorrentFileGuard : private FileGuard
|
||||
Q_GADGET
|
||||
|
||||
public:
|
||||
explicit TorrentFileGuard(const QString &path = QString());
|
||||
explicit TorrentFileGuard(const QString &path = {});
|
||||
~TorrentFileGuard();
|
||||
|
||||
/// marks the torrent file as loaded (added) into the BitTorrent::Session
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace
|
||||
return keys;
|
||||
}
|
||||
|
||||
QString getRegValue(const HKEY handle, const QString &name = QString())
|
||||
QString getRegValue(const HKEY handle, const QString &name = {})
|
||||
{
|
||||
QString result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user