diff --git a/src/base/search/searchpluginmanager.cpp b/src/base/search/searchpluginmanager.cpp index 48ff4c81d..3bfd4d4de 100644 --- a/src/base/search/searchpluginmanager.cpp +++ b/src/base/search/searchpluginmanager.cpp @@ -170,7 +170,7 @@ PluginInfo *SearchPluginManager::pluginInfo(const QString &name) const void SearchPluginManager::enablePlugin(const QString &name, const bool enabled) { - PluginInfo *plugin = m_plugins.value(name, 0); + PluginInfo *plugin = m_plugins.value(name, nullptr); if (plugin) { plugin->enabled = enabled; // Save to Hard disk diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 04f49c683..0a6d15f8d 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -233,7 +233,7 @@ void AddNewTorrentDialog::saveState() void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorrentParams &inParams, QWidget *parent) { - AddNewTorrentDialog *dlg = new AddNewTorrentDialog(inParams, parent); + auto *dlg = new AddNewTorrentDialog(inParams, parent); if (Net::DownloadManager::hasSupportedScheme(source)) { // Launch downloader diff --git a/src/gui/transferlistmodel.cpp b/src/gui/transferlistmodel.cpp index d182d615a..9d69d5da4 100644 --- a/src/gui/transferlistmodel.cpp +++ b/src/gui/transferlistmodel.cpp @@ -149,7 +149,7 @@ QVariant TransferListModel::headerData(int section, Qt::Orientation orientation, case TR_RATIO: case TR_PRIORITY: case TR_LAST_ACTIVITY: - return {Qt::AlignRight | Qt::AlignVCenter}; + return QVariant(Qt::AlignRight | Qt::AlignVCenter); default: return QAbstractListModel::headerData(section, orientation, role); } diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 6edbe1d31..a46afa2a8 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -134,7 +134,7 @@ namespace QVariantList getStickyTrackers(const BitTorrent::TorrentHandle *const torrent) { uint seedsDHT = 0, seedsPeX = 0, seedsLSD = 0, leechesDHT = 0, leechesPeX = 0, leechesLSD = 0; - for (const BitTorrent::PeerInfo &peer : torrent->peers()) { + for (const BitTorrent::PeerInfo &peer : asConst(torrent->peers())) { if (peer.isConnecting()) continue; if (peer.isSeed()) {