mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-01 23:19:18 +03:00
Instantiate SearchPluginManager with other application components
This commit is contained in:
parent
de8050701d
commit
b2ffd6e03b
2 changed files with 4 additions and 2 deletions
|
@ -72,6 +72,7 @@
|
|||
#include "base/rss/rss_autodownloader.h"
|
||||
#include "base/rss/rss_session.h"
|
||||
#include "base/scanfoldersmodel.h"
|
||||
#include "base/search/searchpluginmanager.h"
|
||||
#include "base/settingsstorage.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
|
@ -514,6 +515,7 @@ int Application::exec(const QStringList ¶ms)
|
|||
|
||||
new RSS::Session; // create RSS::Session singleton
|
||||
new RSS::AutoDownloader; // create RSS::AutoDownloader singleton
|
||||
new SearchPluginManager;
|
||||
|
||||
#ifdef DISABLE_GUI
|
||||
#ifndef DISABLE_WEBUI
|
||||
|
@ -708,6 +710,7 @@ void Application::cleanup()
|
|||
delete m_webui;
|
||||
#endif
|
||||
|
||||
delete SearchPluginManager::instance();
|
||||
delete RSS::AutoDownloader::instance();
|
||||
delete RSS::Session::instance();
|
||||
|
||||
|
|
|
@ -132,8 +132,7 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
|
|||
connect(m_tabStatusChangedMapper, static_cast<void (QSignalMapper::*)(QWidget *)>(&QSignalMapper::mapped)
|
||||
, this, &SearchWidget::tabStatusChanged);
|
||||
|
||||
// NOTE: Although SearchManager is Application-wide component now, we still create it the legacy way.
|
||||
auto *searchManager = new SearchPluginManager;
|
||||
auto *searchManager = SearchPluginManager::instance();
|
||||
const auto onPluginChanged = [this]()
|
||||
{
|
||||
fillPluginComboBox();
|
||||
|
|
Loading…
Reference in a new issue