[LyX/master] Replace deprecated function

Juergen Spitzmueller spitz at lyx.org
Wed May 17 05:49:23 UTC 2023


commit 92f211d6b4fc8de8ea60427d74afecd4ad90b3d0
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Wed May 17 08:56:12 2023 +0200

    Replace deprecated function
    
    activateWindow() is available back to Qt4 (at least)
---
 src/frontends/qt/GuiApplication.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 5abab17..165d140 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -1825,7 +1825,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 			createView(QString(), false); // keep hidden
 			current_view_->newDocument(to_utf8(cmd.argument()));
 			current_view_->show();
-			setActiveWindow(current_view_);
+			current_view_->activateWindow();
 		} else {
 			current_view_->newDocument(to_utf8(cmd.argument()));
 		}
@@ -2619,7 +2619,7 @@ void GuiApplication::createView(QString const & geometry_arg, bool autoShow,
 
 	if (autoShow) {
 		view->show();
-		setActiveWindow(view);
+		view->activateWindow();
 	}
 
 	if (!geometry_arg.isEmpty()) {


More information about the lyx-cvs mailing list