mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Don't use instance for accessing static functions
This commit is contained in:
parent
e1be46820b
commit
2059825597
@ -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))
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user