From 6848ebfe45bea5c3198deabb3c11ccbb3d563b74 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Fri, 14 Jun 2024 21:48:29 +0800 Subject: [PATCH] opt: remove deprecated method setActivateWindow() --- src/ui/mainwindow.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 6ba6b8b0..4efaec2a 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -2756,7 +2756,6 @@ void MainWindow::toggleMainWindow( bool onlyShow ) if ( !isVisible() ) { show(); - qApp->setActiveWindow( this ); activateWindow(); raise(); shown = true; @@ -2771,10 +2770,9 @@ void MainWindow::toggleMainWindow( bool onlyShow ) shown = true; } else if ( !isActiveWindow() ) { - qApp->setActiveWindow( this ); + activateWindow(); if ( cfg.preferences.raiseWindowOnSearch ) { raise(); - activateWindow(); } shown = true; }