From 3c2e36d0400924437bc04896f2b6fa3e2f2cd368 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Wed, 9 Oct 2024 23:53:09 -0400 Subject: [PATCH] delete MainWindow::fillWordListFromHistory which is unused --- src/ui/mainwindow.cc | 19 ------------------- src/ui/mainwindow.hh | 2 -- 2 files changed, 21 deletions(-) diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 568edd87..e1e93d2c 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -3959,25 +3959,6 @@ void MainWindow::on_importFavorites_triggered() mainStatusBar->showMessage( tr( "Favorites import complete" ), 5000 ); } -void MainWindow::fillWordListFromHistory() -{ - ui.wordList->setUpdatesEnabled( false ); - ui.wordList->clear(); - - QList< History::Item > const & items = history.getItems(); - for ( const auto & item : items ) { - History::Item const * i = &item; - auto s = new QListWidgetItem( i->word, ui.wordList ); - if ( s->text().at( 0 ).direction() == QChar::DirR ) - s->setTextAlignment( Qt::AlignRight ); - if ( s->text().at( 0 ).direction() == QChar::DirL ) - s->setTextAlignment( Qt::AlignLeft ); - ui.wordList->addItem( s ); - } - - ui.wordList->setUpdatesEnabled( true ); -} - void MainWindow::focusWordList() { if ( ui.wordList->count() > 0 ) diff --git a/src/ui/mainwindow.hh b/src/ui/mainwindow.hh index 9e6aa2fa..d8f22ba4 100644 --- a/src/ui/mainwindow.hh +++ b/src/ui/mainwindow.hh @@ -243,8 +243,6 @@ private: ArticleView * getCurrentArticleView(); void ctrlTabPressed(); - void fillWordListFromHistory(); - QString unescapeTabHeader( QString const & header ); void respondToTranslationRequest( QString const & word,