Browse Source

Instantiate SearchPluginManager with other application components

adaptive-webui-19844
Thomas Piccirello 7 years ago
parent
commit
b2ffd6e03b
  1. 3
      src/app/application.cpp
  2. 3
      src/gui/search/searchwidget.cpp

3
src/app/application.cpp

@ -72,6 +72,7 @@
#include "base/rss/rss_autodownloader.h" #include "base/rss/rss_autodownloader.h"
#include "base/rss/rss_session.h" #include "base/rss/rss_session.h"
#include "base/scanfoldersmodel.h" #include "base/scanfoldersmodel.h"
#include "base/search/searchpluginmanager.h"
#include "base/settingsstorage.h" #include "base/settingsstorage.h"
#include "base/utils/fs.h" #include "base/utils/fs.h"
#include "base/utils/misc.h" #include "base/utils/misc.h"
@ -514,6 +515,7 @@ int Application::exec(const QStringList &params)
new RSS::Session; // create RSS::Session singleton new RSS::Session; // create RSS::Session singleton
new RSS::AutoDownloader; // create RSS::AutoDownloader singleton new RSS::AutoDownloader; // create RSS::AutoDownloader singleton
new SearchPluginManager;
#ifdef DISABLE_GUI #ifdef DISABLE_GUI
#ifndef DISABLE_WEBUI #ifndef DISABLE_WEBUI
@ -708,6 +710,7 @@ void Application::cleanup()
delete m_webui; delete m_webui;
#endif #endif
delete SearchPluginManager::instance();
delete RSS::AutoDownloader::instance(); delete RSS::AutoDownloader::instance();
delete RSS::Session::instance(); delete RSS::Session::instance();

3
src/gui/search/searchwidget.cpp

@ -132,8 +132,7 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
connect(m_tabStatusChangedMapper, static_cast<void (QSignalMapper::*)(QWidget *)>(&QSignalMapper::mapped) connect(m_tabStatusChangedMapper, static_cast<void (QSignalMapper::*)(QWidget *)>(&QSignalMapper::mapped)
, this, &SearchWidget::tabStatusChanged); , this, &SearchWidget::tabStatusChanged);
// NOTE: Although SearchManager is Application-wide component now, we still create it the legacy way. auto *searchManager = SearchPluginManager::instance();
auto *searchManager = new SearchPluginManager;
const auto onPluginChanged = [this]() const auto onPluginChanged = [this]()
{ {
fillPluginComboBox(); fillPluginComboBox();

Loading…
Cancel
Save