commit:     541a1f06fe45169a693c9e1ca4d2a084d56b81f9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 09:55:32 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 11:00:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=541a1f06

dev-qt/qtwidgets: Revert "Reset QWidget's winId..."

Reported-by: Nikos Chantziaras <realnc <AT> gmail.com>
Closes: https://bugs.gentoo.org/689704
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../qtwidgets-5.12.4-revert-reset-winId.patch      | 41 +++++++++++++++
 dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild        | 60 ++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/dev-qt/qtwidgets/files/qtwidgets-5.12.4-revert-reset-winId.patch 
b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-revert-reset-winId.patch
new file mode 100644
index 00000000000..777d0195a53
--- /dev/null
+++ b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-revert-reset-winId.patch
@@ -0,0 +1,41 @@
+From deac052a40c93633041da058d5c73c9e91aa76c7 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.ves...@qt.io>
+Date: Fri, 12 Jul 2019 12:28:29 +0200
+Subject: [PATCH] Revert "Reset QWidget's winId when backing window surface is
+ destroyed"
+
+This reverts commit a9246c7132a2c8864d3ae6cebd260bb9ee711fcb.
+
+The QWidget machinery is way to fragile to reset the winId under the
+feet of QWidget like that. We would potentially need to include all
+the logic in QWidget::destroy. This also ties into the flow between
+QtGui and QtWidgets during window closing, which is still unresolved.
+
+Change-Id: I168048a63c89796398eb5331a80ce3e5c8d9a208
+Fixes: QTBUG-76588
+Task-number: QTBUG-69289
+Reviewed-by: Friedemann Kleint <friedemann.kle...@qt.io>
+Reviewed-by: Volker Hilsheimer <volker.hilshei...@qt.io>
+---
+ src/widgets/kernel/qwidget.cpp | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
+index fdb38729032..6f0f39a3443 100644
+--- a/src/widgets/kernel/qwidget.cpp
++++ b/src/widgets/kernel/qwidget.cpp
+@@ -9382,12 +9382,6 @@ bool QWidget::event(QEvent *event)
+         d->renderToTextureReallyDirty = 1;
+ #endif
+         break;
+-    case QEvent::PlatformSurface: {
+-        auto surfaceEvent = static_cast<QPlatformSurfaceEvent*>(event);
+-        if (surfaceEvent->surfaceEventType() == 
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed)
+-            d->setWinId(0);
+-        break;
+-    }
+ #ifndef QT_NO_PROPERTIES
+     case QEvent::DynamicPropertyChange: {
+         const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent 
*>(event)->propertyName();
+-- 
+2.16.3

diff --git a/dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild 
b/dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild
new file mode 100644
index 00000000000..9839e4d9c9d
--- /dev/null
+++ b/dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Set of components for creating classic desktop-style UIs for the 
Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+       KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+fi
+
+# keep IUSE defaults in sync with qtgui
+IUSE="gles2 gtk +png +xcb"
+
+DEPEND="
+       ~dev-qt/qtcore-${PV}
+       ~dev-qt/qtgui-${PV}[gles2=,png=,xcb?]
+       gtk? (
+               ~dev-qt/qtgui-${PV}[dbus]
+               x11-libs/gtk+:3
+               x11-libs/libX11
+               x11-libs/pango
+       )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+       src/tools/uic
+       src/widgets
+       src/plugins/platformthemes
+)
+
+QT5_GENTOO_CONFIG=(
+       gtk:gtk3:
+       ::widgets
+       !:no-widgets:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+       :widgets
+)
+
+PATCHES+=(
+       "${FILESDIR}/${P}-revert-reset-winId.patch" # bug 689704
+)
+
+src_configure() {
+       local myconf=(
+               -opengl $(usex gles2 es2 desktop)
+               $(qt_use gtk)
+               -gui
+               $(qt_use png libpng system)
+               -widgets
+               $(qt_use xcb xcb system)
+               $(usex xcb '-xcb-xlib -xcb-xinput -xkb -xkbcommon' '')
+       )
+       qt5-build_src_configure
+}

Reply via email to