|
|
@ -121,11 +121,19 @@ SearchWidget::SearchWidget(MainWindow *mainWindow) |
|
|
|
connect(m_searchEngine, &SearchEngine::searchFailed, this, &SearchWidget::searchFailed); |
|
|
|
connect(m_searchEngine, &SearchEngine::searchFailed, this, &SearchWidget::searchFailed); |
|
|
|
connect(m_searchEngine, &SearchEngine::torrentFileDownloaded, this, &SearchWidget::addTorrentToSession); |
|
|
|
connect(m_searchEngine, &SearchEngine::torrentFileDownloaded, this, &SearchWidget::addTorrentToSession); |
|
|
|
|
|
|
|
|
|
|
|
// Fill in category combobox
|
|
|
|
const auto onPluginChanged = [this]() |
|
|
|
|
|
|
|
{ |
|
|
|
fillCatCombobox(); |
|
|
|
fillCatCombobox(); |
|
|
|
fillPluginComboBox(); |
|
|
|
fillPluginComboBox(); |
|
|
|
|
|
|
|
|
|
|
|
selectActivePage(); |
|
|
|
selectActivePage(); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
connect(m_searchEngine, &SearchEngine::pluginInstalled, this, onPluginChanged); |
|
|
|
|
|
|
|
connect(m_searchEngine, &SearchEngine::pluginUninstalled, this, onPluginChanged); |
|
|
|
|
|
|
|
connect(m_searchEngine, &SearchEngine::pluginUpdated, this, onPluginChanged); |
|
|
|
|
|
|
|
connect(m_searchEngine, &SearchEngine::pluginEnabled, this, onPluginChanged); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Fill in category combobox
|
|
|
|
|
|
|
|
onPluginChanged(); |
|
|
|
|
|
|
|
|
|
|
|
connect(m_ui->m_searchPattern, &LineEdit::returnPressed, m_ui->searchButton, &QPushButton::click); |
|
|
|
connect(m_ui->m_searchPattern, &LineEdit::returnPressed, m_ui->searchButton, &QPushButton::click); |
|
|
|
connect(m_ui->m_searchPattern, &LineEdit::textEdited, this, &SearchWidget::searchTextEdited); |
|
|
|
connect(m_ui->m_searchPattern, &LineEdit::textEdited, this, &SearchWidget::searchTextEdited); |
|
|
@ -248,10 +256,7 @@ void SearchWidget::addTorrentToSession(const QString &source) |
|
|
|
|
|
|
|
|
|
|
|
void SearchWidget::on_pluginsButton_clicked() |
|
|
|
void SearchWidget::on_pluginsButton_clicked() |
|
|
|
{ |
|
|
|
{ |
|
|
|
PluginSelectDlg *dlg = new PluginSelectDlg(m_searchEngine, this); |
|
|
|
new PluginSelectDlg(m_searchEngine, this); |
|
|
|
connect(dlg, &PluginSelectDlg::pluginsChanged, this, &SearchWidget::fillCatCombobox); |
|
|
|
|
|
|
|
connect(dlg, &PluginSelectDlg::pluginsChanged, this, &SearchWidget::fillPluginComboBox); |
|
|
|
|
|
|
|
connect(dlg, &PluginSelectDlg::pluginsChanged, this, &SearchWidget::selectActivePage); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SearchWidget::searchTextEdited(QString) |
|
|
|
void SearchWidget::searchTextEdited(QString) |
|
|
|