mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Remove wrong dependency on Main Window
Don't depend on upper level widget (Main Window) state. PR #21816.
This commit is contained in:
committed by
GitHub
parent
e51fcc6ea0
commit
ea35aa45d6
@@ -728,6 +728,16 @@ void MainWindow::displaySearchTab(bool enable)
|
||||
if (!m_searchWidget)
|
||||
{
|
||||
m_searchWidget = new SearchWidget(app(), this);
|
||||
connect(m_searchWidget, &SearchWidget::activeSearchFinished, this, [this](const bool failed)
|
||||
{
|
||||
if (app()->desktopIntegration()->isNotificationsEnabled() && (currentTabWidget() != m_searchWidget))
|
||||
{
|
||||
if (failed)
|
||||
app()->desktopIntegration()->showNotification(tr("Search Engine"), tr("Search has failed"));
|
||||
else
|
||||
app()->desktopIntegration()->showNotification(tr("Search Engine"), tr("Search has finished"));
|
||||
}
|
||||
});
|
||||
m_tabs->insertTab(1, m_searchWidget,
|
||||
#ifndef Q_OS_MACOS
|
||||
UIThemeManager::instance()->getIcon(u"edit-find"_s),
|
||||
|
||||
Reference in New Issue
Block a user