From 1a50815b8447d2c108b2ac0ccfb2e56654835c1c Mon Sep 17 00:00:00 2001
From: Paul Mathai <sonnysighed@e.email>
Date: Sat, 26 Aug 2023 14:25:32 -0700
Subject: [PATCH] upgpkg: 5.15.10+kde+r152-2, pyside2 patch

---
 trunk/PKGBUILD                             |  11 +-
 trunk/work-around-pyside2-brokenness.patch | 138 +++++++++++++++++++++
 2 files changed, 146 insertions(+), 3 deletions(-)
 create mode 100644 trunk/work-around-pyside2-brokenness.patch

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index e7c812c..dd5be41 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -9,7 +9,7 @@
 
 pkgbase=qt5-base
 _basever=5.15.10
-pkgver=5.15.10+kde+r147
+pkgver=5.15.10+kde+r152
 pkgrel=2
 pkgdesc="A cross-platform application and UI framework"
 url='https://www.qt.io'
@@ -20,9 +20,10 @@ pkgname=(
 )
 
 track="commit"
-target="e24dc54b2b4054413650904288aa7a363eee23a7"
+target="f959f5879597d48e3d3b46d7d395717fe94c78bc"
 source=(
     "git+https://invent.kde.org/qt/qt/${pkgbase/5-/}#${track}=${target}"
+    work-around-pyside2-brokenness.patch
     qt5-base-cflags.patch
     qt5-base-nostrip.patch
 )
@@ -105,6 +106,7 @@ pkgver() {
 prepare() {
     cd ${pkgbase/5-}
 
+    patch -p1 < ../work-around-pyside2-brokenness.patch 
     patch -p1 < ../qt5-base-cflags.patch ## Use system CFLAGS in qmake
     patch -p1 < ../qt5-base-nostrip.patch ## Don't strip binaries with qmake
 }
@@ -196,4 +198,7 @@ package_qt5-xcb-private-headers() {
 arch=(x86_64)
 license=(GPL3 LGPL3 FDL custom)
 
-sha512sums=('')
+sha256sums=('SKIP'
+            'fbc72a7b90f104c50020879884636614e169669fc66a1705b3df6dd28ad8e5bb'
+            '5411edbe215c24b30448fac69bd0ba7c882f545e8cf05027b2b6e2227abc5e78'
+            '957ff2f27b64a1358f8de1273d2e2691ce9edf2ab7acef35ad8dbdd66d2a1d58')
diff --git a/trunk/work-around-pyside2-brokenness.patch b/trunk/work-around-pyside2-brokenness.patch
new file mode 100644
index 0000000..ee959bb
--- /dev/null
+++ b/trunk/work-around-pyside2-brokenness.patch
@@ -0,0 +1,138 @@
+# Patch from OpenMandriva:
+# https://github.com/OpenMandrivaAssociation/qt5-qtbase/commit/20f97a4b#diff-c548550538903adec7a57251150fb23c61089ec82748fae900869f550aefc8f6R161
+
+diff -up qtbase-everywhere-src-5.15.9/src/gui/kernel/qevent.h.5~ qtbase-everywhere-src-5.15.9/src/gui/kernel/qevent.h
+--- qtbase-everywhere-src-5.15.9/src/gui/kernel/qevent.h.5~	2023-03-23 20:06:47.000000000 +0100
++++ qtbase-everywhere-src-5.15.9/src/gui/kernel/qevent.h	2023-04-15 23:23:40.599956996 +0200
+@@ -104,15 +104,15 @@ protected:
+ class Q_GUI_EXPORT QMouseEvent : public QInputEvent
+ {
+ public:
+-    QMouseEvent(Type type, const QPointF &localPos, Qt::MouseButton button,
++    QMouseEvent(QEvent::Type type, const QPointF &localPos, Qt::MouseButton button,
+                 Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+-    QMouseEvent(Type type, const QPointF &localPos, const QPointF &screenPos,
++    QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &screenPos,
+                 Qt::MouseButton button, Qt::MouseButtons buttons,
+                 Qt::KeyboardModifiers modifiers);
+-    QMouseEvent(Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos,
++    QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos,
+                 Qt::MouseButton button, Qt::MouseButtons buttons,
+                 Qt::KeyboardModifiers modifiers);
+-    QMouseEvent(Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos,
++    QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos,
+                 Qt::MouseButton button, Qt::MouseButtons buttons,
+                 Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source);
+     ~QMouseEvent();
+@@ -154,7 +154,7 @@ protected:
+ class Q_GUI_EXPORT QHoverEvent : public QInputEvent
+ {
+ public:
+-    QHoverEvent(Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
++    QHoverEvent(QEvent::Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
+     ~QHoverEvent();
+ 
+ #ifndef QT_NO_INTEGER_EVENT_COORDINATES
+@@ -282,12 +282,12 @@ public:
+ #if QT_DEPRECATED_SINCE(5, 15)
+     // Actually deprecated since 5.4, in docs
+     QT_DEPRECATED_VERSION_X_5_15("Use the other QTabletEvent constructor")
+-    QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
++    QTabletEvent(QEvent::Type t, const QPointF &pos, const QPointF &globalPos,
+                  int device, int pointerType, qreal pressure, int xTilt, int yTilt,
+                  qreal tangentialPressure, qreal rotation, int z,
+                  Qt::KeyboardModifiers keyState, qint64 uniqueID); // ### remove in Qt 6
+ #endif
+-    QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
++    QTabletEvent(QEvent::Type t, const QPointF &pos, const QPointF &globalPos,
+                  int device, int pointerType, qreal pressure, int xTilt, int yTilt,
+                  qreal tangentialPressure, qreal rotation, int z,
+                  Qt::KeyboardModifiers keyState, qint64 uniqueID,
+@@ -377,9 +377,9 @@ protected:
+ class Q_GUI_EXPORT QKeyEvent : public QInputEvent
+ {
+ public:
+-    QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(),
++    QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(),
+               bool autorep = false, ushort count = 1);
+-    QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers,
++    QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers,
+               quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
+               const QString &text = QString(), bool autorep = false, ushort count = 1);
+     ~QKeyEvent();
+@@ -399,7 +399,7 @@ public:
+ 
+     // Functions for the extended key event information
+ #if QT_DEPRECATED_SINCE(5, 0)
+-    static inline QKeyEvent *createExtendedKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers,
++    static inline QKeyEvent *createExtendedKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers,
+                                              quint32 nativeScanCode, quint32 nativeVirtualKey,
+                                              quint32 nativeModifiers,
+                                              const QString& text = QString(), bool autorep = false,
+@@ -682,7 +682,7 @@ class Q_GUI_EXPORT QDragMoveEvent : publ
+ {
+ public:
+     QDragMoveEvent(const QPoint &pos, Qt::DropActions actions, const QMimeData *data,
+-                   Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type = DragMove);
++                   Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type = QEvent::DragMove);
+     ~QDragMoveEvent();
+ 
+     inline QRect answerRect() const { return rect; }
+diff -up qtbase-everywhere-src-5.15.9/src/widgets/graphicsview/qgraphicssceneevent.h.5~ qtbase-everywhere-src-5.15.9/src/widgets/graphicsview/qgraphicssceneevent.h
+--- qtbase-everywhere-src-5.15.9/src/widgets/graphicsview/qgraphicssceneevent.h.5~	2023-03-23 20:06:47.000000000 +0100
++++ qtbase-everywhere-src-5.15.9/src/widgets/graphicsview/qgraphicssceneevent.h	2023-04-15 23:22:38.038387091 +0200
+@@ -82,7 +82,7 @@ class QGraphicsSceneMouseEventPrivate;
+ class Q_WIDGETS_EXPORT QGraphicsSceneMouseEvent : public QGraphicsSceneEvent
+ {
+ public:
+-    explicit QGraphicsSceneMouseEvent(Type type = None);
++    explicit QGraphicsSceneMouseEvent(QEvent::Type type = QEvent::None);
+     ~QGraphicsSceneMouseEvent();
+ 
+     QPointF pos() const;
+@@ -136,7 +136,7 @@ class QGraphicsSceneWheelEventPrivate;
+ class Q_WIDGETS_EXPORT QGraphicsSceneWheelEvent : public QGraphicsSceneEvent
+ {
+ public:
+-    explicit QGraphicsSceneWheelEvent(Type type = None);
++    explicit QGraphicsSceneWheelEvent(QEvent::Type type = QEvent::None);
+     ~QGraphicsSceneWheelEvent();
+ 
+     QPointF pos() const;
+@@ -171,7 +171,7 @@ class Q_WIDGETS_EXPORT QGraphicsSceneCon
+ public:
+     enum Reason { Mouse, Keyboard, Other };
+ 
+-    explicit QGraphicsSceneContextMenuEvent(Type type = None);
++    explicit QGraphicsSceneContextMenuEvent(QEvent::Type type = QEvent::None);
+     ~QGraphicsSceneContextMenuEvent();
+ 
+     QPointF pos() const;
+@@ -198,7 +198,7 @@ class QGraphicsSceneHoverEventPrivate;
+ class Q_WIDGETS_EXPORT QGraphicsSceneHoverEvent : public QGraphicsSceneEvent
+ {
+ public:
+-    explicit QGraphicsSceneHoverEvent(Type type = None);
++    explicit QGraphicsSceneHoverEvent(QEvent::Type type = QEvent::None);
+     ~QGraphicsSceneHoverEvent();
+ 
+     QPointF pos() const;
+@@ -231,7 +231,7 @@ class QGraphicsSceneHelpEventPrivate;
+ class Q_WIDGETS_EXPORT QGraphicsSceneHelpEvent : public QGraphicsSceneEvent
+ {
+ public:
+-    explicit QGraphicsSceneHelpEvent(Type type = None);
++    explicit QGraphicsSceneHelpEvent(QEvent::Type type = QEvent::None);
+     ~QGraphicsSceneHelpEvent();
+ 
+     QPointF scenePos() const;
+@@ -249,7 +249,7 @@ class QGraphicsSceneDragDropEventPrivate
+ class Q_WIDGETS_EXPORT QGraphicsSceneDragDropEvent : public QGraphicsSceneEvent
+ {
+ public:
+-    explicit QGraphicsSceneDragDropEvent(Type type = None);
++    explicit QGraphicsSceneDragDropEvent(QEvent::Type type = QEvent::None);
+     ~QGraphicsSceneDragDropEvent();
+ 
+     QPointF pos() const;
+
-- 
GitLab