diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index cbba62d4..31f085c1 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -3730,13 +3730,6 @@ void MainWindow::wordReceived( const QString & word ) respondToTranslationRequest( word, false ); } -void MainWindow::headwordReceived( const QString & word, const QString & ID ) -{ - toggleMainWindow( true ); - setInputLineText( word, WildcardPolicy::EscapeWildcards, NoPopupChange ); - respondToTranslationRequest( word, false, ArticleView::scrollToFromDictionaryId( ID ), false ); -} - void MainWindow::updateFavoritesMenu() { if ( ui.favoritesPane->isVisible() ) { @@ -4141,7 +4134,13 @@ void MainWindow::showDictionaryHeadwords( Dictionary::Class * dict ) headwordsDlg = new DictHeadwords( this, cfg, dict ); addGlobalActionsToDialog( headwordsDlg ); addGroupComboBoxActionsToDialog( headwordsDlg, groupList ); - connect( headwordsDlg, &DictHeadwords::headwordSelected, this, &MainWindow::headwordReceived ); + connect( headwordsDlg, + &DictHeadwords::headwordSelected, + this, + [ this ]( QString const & headword, QString const & dictID ) { + setInputLineText( headword, WildcardPolicy::EscapeWildcards, NoPopupChange ); + respondToTranslationRequest( headword, false, ArticleView::scrollToFromDictionaryId( dictID ), false ); + } ); connect( headwordsDlg, &DictHeadwords::closeDialog, this, diff --git a/src/ui/mainwindow.hh b/src/ui/mainwindow.hh index 51d3a2b5..51e8b06f 100644 --- a/src/ui/mainwindow.hh +++ b/src/ui/mainwindow.hh @@ -67,7 +67,6 @@ public slots: void messageFromAnotherInstanceReceived( QString const & ); void showStatusBarMessage( QString const &, int, QPixmap const & ); void wordReceived( QString const & ); - void headwordReceived( QString const &, QString const & ); void headwordFromFavorites( QString const &, QString const & ); void quitApp();