mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Replace the zeroing of pointers with nullptr
This commit is contained in:
@@ -51,7 +51,7 @@ namespace
|
||||
class NetworkCookieJar: public QNetworkCookieJar
|
||||
{
|
||||
public:
|
||||
explicit NetworkCookieJar(QObject *parent = 0)
|
||||
explicit NetworkCookieJar(QObject *parent = nullptr)
|
||||
: QNetworkCookieJar(parent)
|
||||
{
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
@@ -107,7 +107,7 @@ namespace
|
||||
|
||||
using namespace Net;
|
||||
|
||||
DownloadManager *DownloadManager::m_instance = 0;
|
||||
DownloadManager *DownloadManager::m_instance = nullptr;
|
||||
|
||||
DownloadManager::DownloadManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -128,7 +128,7 @@ void DownloadManager::freeInstance()
|
||||
{
|
||||
if (m_instance) {
|
||||
delete m_instance;
|
||||
m_instance = 0;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Net
|
||||
#endif
|
||||
|
||||
private:
|
||||
explicit DownloadManager(QObject *parent = 0);
|
||||
explicit DownloadManager(QObject *parent = nullptr);
|
||||
|
||||
void applyProxySettings();
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ GeoIPDatabase::GeoIPDatabase(quint32 size)
|
||||
|
||||
GeoIPDatabase *GeoIPDatabase::load(const QString &filename, QString &error)
|
||||
{
|
||||
GeoIPDatabase *db = 0;
|
||||
GeoIPDatabase *db = nullptr;
|
||||
QFile file(filename);
|
||||
if (file.size() > MAX_FILE_SIZE) {
|
||||
error = tr("Unsupported database file size.");
|
||||
@@ -122,7 +122,7 @@ GeoIPDatabase *GeoIPDatabase::load(const QString &filename, QString &error)
|
||||
|
||||
GeoIPDatabase *GeoIPDatabase::load(const QByteArray &data, QString &error)
|
||||
{
|
||||
GeoIPDatabase *db = 0;
|
||||
GeoIPDatabase *db = nullptr;
|
||||
if (data.size() > MAX_FILE_SIZE) {
|
||||
error = tr("Unsupported database file size.");
|
||||
return 0;
|
||||
|
||||
@@ -80,7 +80,7 @@ void ProxyConfigurationManager::freeInstance()
|
||||
{
|
||||
if (m_instance) {
|
||||
delete m_instance;
|
||||
m_instance = 0;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Net
|
||||
Q_DISABLE_COPY(ReverseResolution)
|
||||
|
||||
public:
|
||||
explicit ReverseResolution(QObject *parent = 0);
|
||||
explicit ReverseResolution(QObject *parent = nullptr);
|
||||
~ReverseResolution();
|
||||
|
||||
void resolve(const QString &ip);
|
||||
|
||||
Reference in New Issue
Block a user