commit:     77dc5d2fccd783c2826bc5828ad493dbf1ed5415
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 23 16:37:45 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jun 23 16:43:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77dc5d2f

dev-qt/qtwidgets: Revert 5.9.6 runtime regression

Reported-by: Theofilos Intzoglou <int.teo <AT> gmail.com>
Tested-by: Bernd Buschinski <b.buschinski <AT> googlemail.com>
Closes: https://bugs.gentoo.org/658520
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 ...5.9.6-QDockWidget-revert-restore-geometry.patch | 115 +++++++++++++++++++++
 dev-qt/qtwidgets/qtwidgets-5.9.6-r1.ebuild         |  59 +++++++++++
 2 files changed, 174 insertions(+)

diff --git 
a/dev-qt/qtwidgets/files/qtwidgets-5.9.6-QDockWidget-revert-restore-geometry.patch
 
b/dev-qt/qtwidgets/files/qtwidgets-5.9.6-QDockWidget-revert-restore-geometry.patch
new file mode 100644
index 00000000000..3123fc3e50f
--- /dev/null
+++ 
b/dev-qt/qtwidgets/files/qtwidgets-5.9.6-QDockWidget-revert-restore-geometry.patch
@@ -0,0 +1,115 @@
+From 57bc08dac38b02128031357976436fa0f68bd574 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Wed, 20 Jun 2018 20:18:11 +0200
+Subject: [PATCH] Revert "Fix restoring geometry of dockwidget"
+
+See also: Regression caused by the fix for QTBUG-16252
+QTBUG: https://bugreports.qt.io/browse/QTBUG-68939
+
+This reverts commit cbfb6bda1d1ce3e169db6a0deb9bd901076653e4.
+---
+ src/widgets/widgets/qdockarealayout.cpp | 20 ++------------------
+ src/widgets/widgets/qdockarealayout_p.h |  1 -
+ 2 files changed, 2 insertions(+), 19 deletions(-)
+
+diff --git a/src/widgets/widgets/qdockarealayout.cpp 
b/src/widgets/widgets/qdockarealayout.cpp
+index bef7214c75..21d1d4cb85 100644
+--- a/src/widgets/widgets/qdockarealayout.cpp
++++ b/src/widgets/widgets/qdockarealayout.cpp
+@@ -226,7 +226,7 @@ static quintptr tabId(const QDockAreaLayoutItem &item)
+ static const int zero = 0;
+ 
+ QDockAreaLayoutInfo::QDockAreaLayoutInfo()
+-    : restoredSizeHint(0,0), sep(&zero), dockPos(QInternal::LeftDock), 
o(Qt::Horizontal), mainWindow(0)
++    : sep(&zero), dockPos(QInternal::LeftDock), o(Qt::Horizontal), 
mainWindow(0)
+ #if QT_CONFIG(tabbar)
+     , tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth)
+ #endif
+@@ -236,7 +236,7 @@ QDockAreaLayoutInfo::QDockAreaLayoutInfo()
+ QDockAreaLayoutInfo::QDockAreaLayoutInfo(const int *_sep, 
QInternal::DockPosition _dockPos,
+                                             Qt::Orientation _o, int tbshape,
+                                             QMainWindow *window)
+-    : restoredSizeHint(0,0), sep(_sep), dockPos(_dockPos), o(_o), 
mainWindow(window)
++    : sep(_sep), dockPos(_dockPos), o(_o), mainWindow(window)
+ #if QT_CONFIG(tabbar)
+     , tabbed(false), tabBar(0), 
tabBarShape(static_cast<QTabBar::Shape>(tbshape))
+ #endif
+@@ -407,9 +407,6 @@ QSize QDockAreaLayoutInfo::sizeHint() const
+     if (isEmpty())
+         return QSize(0, 0);
+ 
+-    if (!restoredSizeHint.isNull())
+-        return restoredSizeHint;
+-
+     int a = 0, b = 0;
+     int min_perp = 0;
+     int max_perp = QWIDGETSIZE_MAX;
+@@ -2376,7 +2373,6 @@ bool QDockAreaLayout::restoreState(QDataStream &stream, 
const QList<QDockWidget*
+         stream >> size;
+         if (!testing) {
+             docks[pos].rect = QRect(QPoint(0, 0), size);
+-            docks[pos].restoredSizeHint = size;
+         }
+         if (!docks[pos].restoreState(stream, dockwidgets, testing)) {
+             stream.setStatus(QDataStream::ReadCorruptData);
+@@ -2678,8 +2674,6 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> 
*_ver_struct_list,
+         center_rect.setBottom(rect.bottom() - 
docks[QInternal::BottomDock].rect.height() - sep);
+ 
+     QSize left_hint = docks[QInternal::LeftDock].size();
+-    if (!docks[QInternal::LeftDock].restoredSizeHint.isNull())
+-        left_hint = docks[QInternal::LeftDock].restoredSizeHint;
+     if (left_hint.isNull() || fallbackToSizeHints)
+         left_hint = docks[QInternal::LeftDock].sizeHint();
+     QSize left_min = docks[QInternal::LeftDock].minimumSize();
+@@ -2687,8 +2681,6 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> 
*_ver_struct_list,
+     left_hint = left_hint.boundedTo(left_max).expandedTo(left_min);
+ 
+     QSize right_hint = docks[QInternal::RightDock].size();
+-    if (!docks[QInternal::RightDock].restoredSizeHint.isNull())
+-        right_hint = docks[QInternal::RightDock].restoredSizeHint;
+     if (right_hint.isNull() || fallbackToSizeHints)
+         right_hint = docks[QInternal::RightDock].sizeHint();
+     QSize right_min = docks[QInternal::RightDock].minimumSize();
+@@ -2696,8 +2688,6 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> 
*_ver_struct_list,
+     right_hint = right_hint.boundedTo(right_max).expandedTo(right_min);
+ 
+     QSize top_hint = docks[QInternal::TopDock].size();
+-    if (!docks[QInternal::TopDock].restoredSizeHint.isNull())
+-        top_hint = docks[QInternal::TopDock].restoredSizeHint;
+     if (top_hint.isNull() || fallbackToSizeHints)
+         top_hint = docks[QInternal::TopDock].sizeHint();
+     QSize top_min = docks[QInternal::TopDock].minimumSize();
+@@ -2705,8 +2695,6 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> 
*_ver_struct_list,
+     top_hint = top_hint.boundedTo(top_max).expandedTo(top_min);
+ 
+     QSize bottom_hint = docks[QInternal::BottomDock].size();
+-    if (!docks[QInternal::BottomDock].restoredSizeHint.isNull())
+-        bottom_hint = docks[QInternal::BottomDock].restoredSizeHint;
+     if (bottom_hint.isNull() || fallbackToSizeHints)
+         bottom_hint = docks[QInternal::BottomDock].sizeHint();
+     QSize bottom_min = docks[QInternal::BottomDock].minimumSize();
+@@ -3288,10 +3276,6 @@ int QDockAreaLayout::separatorMove(const QList<int> 
&separator, const QPoint &or
+     int delta = 0;
+     int index = separator.last();
+ 
+-    for (int i = 0; i < QInternal::DockCount; ++i)
+-        if (!docks[i].restoredSizeHint.isNull())
+-            docks[i].restoredSizeHint = QSize(0, 0);
+-
+     if (separator.count() > 1) {
+         QDockAreaLayoutInfo *info = this->info(separator);
+         delta = pick(info->o, dest - origin);
+diff --git a/src/widgets/widgets/qdockarealayout_p.h 
b/src/widgets/widgets/qdockarealayout_p.h
+index ea397e00ac..82244c192e 100644
+--- a/src/widgets/widgets/qdockarealayout_p.h
++++ b/src/widgets/widgets/qdockarealayout_p.h
+@@ -189,7 +189,6 @@ public:
+ 
+     QMainWindowLayout *mainWindowLayout() const;
+ 
+-    QSize restoredSizeHint;
+     const int *sep;
+     mutable QVector<QWidget*> separatorWidgets;
+     QInternal::DockPosition dockPos;
+-- 
+2.17.1

diff --git a/dev-qt/qtwidgets/qtwidgets-5.9.6-r1.ebuild 
b/dev-qt/qtwidgets/qtwidgets-5.9.6-r1.ebuild
new file mode 100644
index 00000000000..ac6d6e09d84
--- /dev/null
+++ b/dev-qt/qtwidgets/qtwidgets-5.9.6-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+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 ~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}"
+
+PATCHES=( "${FILESDIR}/${P}-QDockWidget-revert-restore-geometry.patch" )
+
+QT5_TARGET_SUBDIRS=(
+       src/tools/uic
+       src/widgets
+       src/plugins/platformthemes
+)
+
+QT5_GENTOO_CONFIG=(
+       gtk:gtk3:
+       ::widgets
+       !:no-widgets:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+       :widgets
+)
+
+src_configure() {
+       local myconf=(
+               -opengl $(usex gles2 es2 desktop)
+               $(qt_use gtk)
+               -gui
+               $(qt_use png libpng system)
+               -widgets
+               $(qt_use xcb xcb system)
+               $(qt_use xcb xkbcommon system)
+               $(usex xcb '-xcb-xlib -xinput2 -xkb' '')
+       )
+       qt5-build_src_configure
+}

Reply via email to