Apply PySide2 build fix from OpenMandriva

This commit is contained in:
LuK1337 2023-08-29 20:41:18 +02:00
parent d2061e2275
commit 4db91e0189
2 changed files with 152 additions and 1 deletions

View File

@ -57,7 +57,7 @@
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.15.10
Release: 8%{?dist}
Release: 9%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
@ -125,6 +125,17 @@ Patch64: qt5-qtbase-5.12.1-firebird-4.0.0.patch
# fix for new mariadb
Patch65: qtbase-opensource-src-5.9.0-mysql.patch
# FIXME This patch is completely meaningless in the context of C++.
# It is a workaround for a pyside2 build failure with Qt 5.15.9,
# pyside2 5.15.9, clang 16.0.1 -- the generated code thinks a
# not otherwise specified "Type" is in fact a
# QFlags<QOpenGLShader::ShaderTypeBit>, causing many functions
# looking for a QEvent::Type to be bogus.
# Since there are no side effects to superfluously specifying
# QEvent::Type instead of plain "Type" in a QEvent derived class,
# this workaround is acceptable, if not nice.
Patch66: qtbase-5.15.10-work-around-pyside2-brokenness.patch
# gcc-11
Patch90: %{name}-gcc11.patch
@ -441,6 +452,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%if 0%{?fedora} > 27
%patch -P65 -p1 -b .mysql
%endif
%patch -P66 -p1
%patch -P90 -p1 -b .gcc11
@ -1156,6 +1168,9 @@ fi
%changelog
* Tue Aug 29 2023 LuK1337 <priv.luk@gmail.com> - 5.15.10-9
- Apply PySide2 build fix from OpenMandriva
* Tue Aug 22 2023 Jan Grulich <jgrulich@redhat.com> - 5.15.10-8
- Drop QPlatformTheme::Appearance() backports breaking ABI

View File

@ -0,0 +1,136 @@
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 4aba9ff..439e51a 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -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 : public QDropEvent
{
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 --git a/src/widgets/graphicsview/qgraphicssceneevent.h b/src/widgets/graphicsview/qgraphicssceneevent.h
index 9d940be..b7dc19b 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.h
+++ b/src/widgets/graphicsview/qgraphicssceneevent.h
@@ -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 QGraphicsSceneContextMenuEvent : public QGraphicsSceneEve
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;