1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Don't use instance for accessing static functions

This commit is contained in:
Chocobo1 2023-05-05 02:01:07 +08:00
parent e1be46820b
commit 2059825597
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
4 changed files with 6 additions and 6 deletions

View File

@ -225,7 +225,7 @@ namespace
Application::Application(int &argc, char **argv)
: BaseApplication(argc, argv)
, m_shutdownAct(ShutdownDialogAction::Exit)
, m_commandLineArgs(parseCommandLine(this->arguments()))
, m_commandLineArgs(parseCommandLine(Application::arguments()))
, m_storeFileLoggerEnabled(FILELOGGER_SETTINGS_KEY(u"Enabled"_qs))
, m_storeFileLoggerBackup(FILELOGGER_SETTINGS_KEY(u"Backup"_qs))
, m_storeFileLoggerDeleteOld(FILELOGGER_SETTINGS_KEY(u"DeleteOld"_qs))

View File

@ -46,7 +46,7 @@ SearchDownloadHandler::SearchDownloadHandler(const QString &siteUrl, const QStri
, this, &SearchDownloadHandler::downloadProcessFinished);
const QStringList params
{
(m_manager->engineLocation() / Path(u"nova2dl.py"_qs)).toString(),
(SearchPluginManager::engineLocation() / Path(u"nova2dl.py"_qs)).toString(),
siteUrl,
url
};

View File

@ -73,7 +73,7 @@ SearchHandler::SearchHandler(const QString &pattern, const QString &category, co
const QStringList params
{
(m_manager->engineLocation() / Path(u"nova2.py"_qs)).toString(),
(SearchPluginManager::engineLocation() / Path(u"nova2.py"_qs)).toString(),
m_usedPlugins.join(u','),
m_category
};

View File

@ -305,7 +305,7 @@ void CategoryFilterModel::categoryAdded(const QString &categoryName)
if (m_isSubcategoriesEnabled)
{
QStringList expanded = BitTorrent::Session::instance()->expandCategory(categoryName);
QStringList expanded = BitTorrent::Session::expandCategory(categoryName);
if (expanded.count() > 1)
parent = findItem(expanded[expanded.count() - 2]);
}
@ -410,7 +410,7 @@ void CategoryFilterModel::populate()
for (const QString &categoryName : asConst(session->categories()))
{
CategoryModelItem *parent = m_rootItem;
for (const QString &subcat : asConst(session->expandCategory(categoryName)))
for (const QString &subcat : asConst(BitTorrent::Session::expandCategory(categoryName)))
{
const QString subcatName = shortName(subcat);
if (!parent->hasChild(subcatName))
@ -443,7 +443,7 @@ CategoryModelItem *CategoryFilterModel::findItem(const QString &fullName) const
return m_rootItem->child(fullName);
CategoryModelItem *item = m_rootItem;
for (const QString &subcat : asConst(BitTorrent::Session::instance()->expandCategory(fullName)))
for (const QString &subcat : asConst(BitTorrent::Session::expandCategory(fullName)))
{
const QString subcatName = shortName(subcat);
if (!item->hasChild(subcatName)) return nullptr;