Skip to content

Commit

Permalink
delete MainWindow::fillWordListFromHistory which is unused
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Oct 10, 2024
1 parent d5037de commit 3c2e36d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
19 changes: 0 additions & 19 deletions src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
2 changes: 0 additions & 2 deletions src/ui/mainwindow.hh
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ private:
ArticleView * getCurrentArticleView();
void ctrlTabPressed();

void fillWordListFromHistory();

QString unescapeTabHeader( QString const & header );

void respondToTranslationRequest( QString const & word,
Expand Down

0 comments on commit 3c2e36d

Please sign in to comment.