[packages/qt6] upstream qtwebengine fix for broken context menus in dev tools; rel 2

atler atler at pld-linux.org
Wed Aug 9 22:31:32 CEST 2023


commit 2c239eed83f98ff6926e0ea84e0caf07ded8556a
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Aug 9 22:17:07 2023 +0200

    upstream qtwebengine fix for broken context menus in dev tools; rel 2
    
    upstream report: https://bugreports.qt.io/browse/QTBUG-113251
    fixes: https://github.com/qutebrowser/qutebrowser/issues/7676

 QTBUG-113251.patch | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 qt6.spec           |  4 +++-
 2 files changed, 57 insertions(+), 1 deletion(-)
---
diff --git a/qt6.spec b/qt6.spec
index a73e677..dee3b16 100644
--- a/qt6.spec
+++ b/qt6.spec
@@ -107,7 +107,7 @@ Summary:	Qt6 Library
 Summary(pl.UTF-8):	Biblioteka Qt6
 Name:		qt6
 Version:	6.5.2
-Release:	1
+Release:	2
 License:	LGPL v3 or GPL v2 or GPL v3 or commercial
 Group:		X11/Libraries
 Source0:	https://download.qt.io/official_releases/qt/6.5/%{version}/single/qt-everywhere-src-%{version}.tar.xz
@@ -118,6 +118,7 @@ Patch2:		%{name}-gn.patch
 Patch3:		no-implicit-sse2.patch
 Patch4:		x32.patch
 Patch5:		qtwebengine-cmake-build-type.patch
+Patch6:		QTBUG-113251.patch
 URL:		https://www.qt.io/
 %{?with_directfb:BuildRequires:	DirectFB-devel}
 BuildRequires:	EGL-devel
@@ -3575,6 +3576,7 @@ narzędzia.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1 -d qtwebengine
 
 %{__sed} -i -e 's,usr/X11R6/,usr/,g' qtbase/mkspecs/linux-g++-64/qmake.conf
 
diff --git a/QTBUG-113251.patch b/QTBUG-113251.patch
new file mode 100644
index 0000000..67d68e1
--- /dev/null
+++ b/QTBUG-113251.patch
@@ -0,0 +1,54 @@
+From 381175792f1d3b7ef55cea40ec4f0d48f501e9a4 Mon Sep 17 00:00:00 2001
+From: Martin Negyokru <negyokru at inf.u-szeged.hu>
+Date: Fri, 28 Apr 2023 17:37:24 +0200
+Subject: [PATCH] Fix devtools context menus
+
+Set devtools custom menus on 'OnLoadCompleted' event.
+This event should be triggered by the Js frontend
+not by WebContentsObserver.
+
+Fixes: QTBUG-113251
+Change-Id: I815d818c5867d0f1d160a962be5a41a762699e00
+Reviewed-by: Allan Sandfeld Jensen <allan.jensen at qt.io>
+(cherry picked from commit 1243b80433d4a18bc57cf43ab29d02e6007261f3)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot at qt-project.org>
+---
+
+diff --git a/src/core/devtools_frontend_qt.cpp b/src/core/devtools_frontend_qt.cpp
+index 731414d..4ef8b35 100644
+--- a/src/core/devtools_frontend_qt.cpp
++++ b/src/core/devtools_frontend_qt.cpp
+@@ -162,7 +162,7 @@
+     web_contents()->Focus();
+ }
+ 
+-void DevToolsFrontendQt::InspectElementCompleted()
++void DevToolsFrontendQt::OnLoadCompleted()
+ {
+     m_bindings->CallClientMethod("DevToolsAPI", "setUseSoftMenu", base::Value(true));
+ }
+diff --git a/src/core/devtools_frontend_qt.h b/src/core/devtools_frontend_qt.h
+index 3b722c9..a4f1726 100644
+--- a/src/core/devtools_frontend_qt.h
++++ b/src/core/devtools_frontend_qt.h
+@@ -54,18 +54,18 @@
+ 
+     // DevToolsUIBindings::Delegate overrides
+     void ActivateWindow() override;
+-    void InspectElementCompleted() override;
+     void SetEyeDropperActive(bool active) override;
+     void OpenInNewTab(const std::string &url) override;
+     void InspectedContentsClosing() override;
++    void OnLoadCompleted() override;
+ 
++    void InspectElementCompleted() override{};
+     void CloseWindow() override{};
+     void Inspect(scoped_refptr<content::DevToolsAgentHost>) override{};
+     void SetInspectedPageBounds(const gfx::Rect &) override{};
+     void SetIsDocked(bool) override{};
+     void SetWhitelistedShortcuts(const std::string &) override{};
+     void OpenNodeFrontend() override{};
+-    void OnLoadCompleted() override{};
+     void ReadyForTest() override{};
+     void ConnectionReady() override{};
+     void SetOpenNewWindowForPopups(bool) override{};
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qt6.git/commitdiff/2c239eed83f98ff6926e0ea84e0caf07ded8556a



More information about the pld-cvs-commit mailing list