Browse Source

Don't use instance for accessing static functions

adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
2059825597
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/app/application.cpp
  2. 2
      src/base/search/searchdownloadhandler.cpp
  3. 2
      src/base/search/searchhandler.cpp
  4. 6
      src/gui/transferlistfilters/categoryfiltermodel.cpp

2
src/app/application.cpp

@ -225,7 +225,7 @@ namespace @@ -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))

2
src/base/search/searchdownloadhandler.cpp

@ -46,7 +46,7 @@ SearchDownloadHandler::SearchDownloadHandler(const QString &siteUrl, const QStri @@ -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
};

2
src/base/search/searchhandler.cpp

@ -73,7 +73,7 @@ SearchHandler::SearchHandler(const QString &pattern, const QString &category, co @@ -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
};

6
src/gui/transferlistfilters/categoryfiltermodel.cpp

@ -305,7 +305,7 @@ void CategoryFilterModel::categoryAdded(const QString &categoryName) @@ -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() @@ -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 @@ -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…
Cancel
Save