Skip to content

Commit

Permalink
Merge pull request #1571 from xiaoyifang/opt/code-clean
Browse files Browse the repository at this point in the history
clean: remove useless code and refactor
  • Loading branch information
xiaoyifang authored Jun 13, 2024
2 parents 3b6cae9 + 3a46dd2 commit 1580220
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1853,11 +1853,9 @@ void MainWindow::closeCurrentTab()

void MainWindow::closeAllTabs()
{
while ( ui.tabWidget->count() > 1 )
while ( ui.tabWidget->count() > 0 ) {
closeCurrentTab();

// close last tab
closeCurrentTab();
}
}

void MainWindow::closeRestTabs()
Expand Down Expand Up @@ -1897,19 +1895,13 @@ void MainWindow::switchToPrevTab()

void MainWindow::backClicked()
{
GD_DPRINTF( "Back\n" );

ArticleView * view = getCurrentArticleView();

view->back();
}

void MainWindow::forwardClicked()
{
GD_DPRINTF( "Forward\n" );

ArticleView * view = getCurrentArticleView();

view->forward();
}

Expand Down

0 comments on commit 1580220

Please sign in to comment.