From 46be6d183fe044e3f68778753ade0735909fd626 Mon Sep 17 00:00:00 2001 From: Rmys Date: Sat, 11 Nov 2023 18:44:25 +0300 Subject: [PATCH] qt5-wayland qt5-declarative rebuild --- .../qt5/qt5-declarative/files/qt_kde.patch | 37 +++++++++++++++++-- desktop/toolkit/qt5/qt5-declarative/pspec.xml | 7 ++++ .../qt5/qt5-wayland/files/qt_kde.patch | 27 +++++++++----- desktop/toolkit/qt5/qt5-wayland/pspec.xml | 7 ++++ 4 files changed, 65 insertions(+), 13 deletions(-) diff --git a/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch b/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch index 61b52ecd14..67d26a7818 100644 --- a/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch +++ b/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch @@ -269,7 +269,7 @@ index ee31cb38d9..187339169b 100644 bool QQmlData::hasBindingBit(int coreIndex) const diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp -index 852a673ebd..d6b2711c2d 100644 +index 852a673ebd..5f3367e4d2 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -718,18 +718,15 @@ void QQmlPrivate::qdeclarativeelement_destructor(QObject *o) @@ -306,7 +306,38 @@ index 852a673ebd..d6b2711c2d 100644 return; auto objectThreadData = QObjectPrivate::get(object)->threadData.loadRelaxed(); -@@ -1835,49 +1835,73 @@ void QQmlData::releaseDeferredData() +@@ -1588,17 +1588,22 @@ void qmlExecuteDeferred(QObject *object) + { + QQmlData *data = QQmlData::get(object); + +- if (data && !data->deferredData.isEmpty() && !data->wasDeleted(object)) { +- QQmlEnginePrivate *ep = QQmlEnginePrivate::get(data->context->engine); ++ if (!data ++ || !data->context ++ || !data->context->engine ++ || data->deferredData.isEmpty() ++ || data->wasDeleted(object)) { ++ return; ++ } + +- QQmlComponentPrivate::DeferredState state; +- QQmlComponentPrivate::beginDeferred(ep, object, &state); ++ QQmlEnginePrivate *ep = QQmlEnginePrivate::get(data->context->engine); ++ QQmlComponentPrivate::DeferredState state; ++ QQmlComponentPrivate::beginDeferred(ep, object, &state); + +- // Release the reference for the deferral action (we still have one from construction) +- data->releaseDeferredData(); ++ // Release the reference for the deferral action (we still have one from construction) ++ data->releaseDeferredData(); + +- QQmlComponentPrivate::completeDeferred(ep, &state); +- } ++ QQmlComponentPrivate::completeDeferred(ep, &state); + } + + QQmlContext *qmlContext(const QObject *obj) +@@ -1835,49 +1840,73 @@ void QQmlData::releaseDeferredData() void QQmlData::addNotify(int index, QQmlNotifierEndpoint *endpoint) { @@ -406,7 +437,7 @@ index 852a673ebd..d6b2711c2d 100644 } } -@@ -1961,7 +1985,7 @@ void QQmlData::destroyed(QObject *object) +@@ -1961,7 +1990,7 @@ void QQmlData::destroyed(QObject *object) guard->objectDestroyed(object); } diff --git a/desktop/toolkit/qt5/qt5-declarative/pspec.xml b/desktop/toolkit/qt5/qt5-declarative/pspec.xml index fd0b9c330f..9f32d002ae 100755 --- a/desktop/toolkit/qt5/qt5-declarative/pspec.xml +++ b/desktop/toolkit/qt5/qt5-declarative/pspec.xml @@ -69,6 +69,13 @@ + + 2023-11-11 + 5.15.11 + Rebuild + Mustafa Cinasal + muscnsl@gmail.com + 2023-10-07 5.15.11 diff --git a/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch b/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch index d9741ed97e..43b81feeae 100644 --- a/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch +++ b/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch @@ -224,7 +224,7 @@ index e4eca9d4..ba76ba2d 100644 memcpy(buffer->image()->bits(), img.bits(), size_t(img.sizeInBytes())); return buffer; diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp -index 1e2db786..9c3308d5 100644 +index 1e2db786..07b18ab0 100644 --- a/src/client/qwaylanddatadevice.cpp +++ b/src/client/qwaylanddatadevice.cpp @@ -72,6 +72,8 @@ QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWayl @@ -245,9 +245,16 @@ index 1e2db786..9c3308d5 100644 { auto *seat = m_display->currentInputDevice(); auto *origin = seat->pointerFocus(); -@@ -123,7 +125,31 @@ bool QWaylandDataDevice::startDrag(QMimeData *mimeData, QWaylandWindow *icon) +@@ -122,8 +124,38 @@ bool QWaylandDataDevice::startDrag(QMimeData *mimeData, QWaylandWindow *icon) + return false; } ++ // dragging data without mimetypes is a legal operation in Qt terms ++ // but Wayland uses a mimetype to determine if a drag is accepted or not ++ // In this rare case, insert a placeholder ++ if (mimeData->formats().isEmpty()) ++ mimeData->setData(QString::fromLatin1("application/x-qt-avoid-empty-placeholder"), QByteArray("1")); ++ m_dragSource.reset(new QWaylandDataSource(m_display->dndSelectionHandler(), mimeData)); + + if (wl_data_device_get_version(object()) >= 3) @@ -277,7 +284,7 @@ index 1e2db786..9c3308d5 100644 start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial()); return true; -@@ -152,7 +178,7 @@ void QWaylandDataDevice::data_device_drop() +@@ -152,7 +184,7 @@ void QWaylandDataDevice::data_device_drop() supportedActions = drag->supportedActions(); } else if (m_dragOffer) { dragData = m_dragOffer->mimeData(); @@ -286,7 +293,7 @@ index 1e2db786..9c3308d5 100644 } else { return; } -@@ -162,7 +188,11 @@ void QWaylandDataDevice::data_device_drop() +@@ -162,7 +194,11 @@ void QWaylandDataDevice::data_device_drop() QGuiApplication::keyboardModifiers()); if (drag) { @@ -299,7 +306,7 @@ index 1e2db786..9c3308d5 100644 } } -@@ -186,7 +216,7 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, +@@ -186,7 +222,7 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, supportedActions = drag->supportedActions(); } else if (m_dragOffer) { dragData = m_dragOffer->mimeData(); @@ -308,7 +315,7 @@ index 1e2db786..9c3308d5 100644 } const QPlatformDragQtResponse &response = QWindowSystemInterface::handleDrag(m_dragWindow, dragData, m_dragPoint, supportedActions, -@@ -197,11 +227,7 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, +@@ -197,11 +233,7 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, static_cast(QGuiApplicationPrivate::platformIntegration()->drag())->setResponse(response); } @@ -321,7 +328,7 @@ index 1e2db786..9c3308d5 100644 } void QWaylandDataDevice::data_device_leave() -@@ -235,10 +261,10 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe +@@ -235,10 +267,10 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe supportedActions = drag->supportedActions(); } else { dragData = m_dragOffer->mimeData(); @@ -334,7 +341,7 @@ index 1e2db786..9c3308d5 100644 QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers()); -@@ -246,11 +272,7 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe +@@ -246,11 +278,7 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe static_cast(QGuiApplicationPrivate::platformIntegration()->drag())->setResponse(response); } @@ -347,7 +354,7 @@ index 1e2db786..9c3308d5 100644 } #endif // QT_CONFIG(draganddrop) -@@ -277,14 +299,10 @@ void QWaylandDataDevice::selectionSourceCancelled() +@@ -277,14 +305,10 @@ void QWaylandDataDevice::selectionSourceCancelled() #if QT_CONFIG(draganddrop) void QWaylandDataDevice::dragSourceCancelled() { @@ -363,7 +370,7 @@ index 1e2db786..9c3308d5 100644 QPoint QWaylandDataDevice::calculateDragPosition(int x, int y, QWindow *wnd) const { QPoint pnt(wl_fixed_to_int(x), wl_fixed_to_int(y)); -@@ -297,6 +315,33 @@ QPoint QWaylandDataDevice::calculateDragPosition(int x, int y, QWindow *wnd) con +@@ -297,6 +321,33 @@ QPoint QWaylandDataDevice::calculateDragPosition(int x, int y, QWindow *wnd) con } return pnt; } diff --git a/desktop/toolkit/qt5/qt5-wayland/pspec.xml b/desktop/toolkit/qt5/qt5-wayland/pspec.xml index 303e6acfd1..ff36fe8508 100755 --- a/desktop/toolkit/qt5/qt5-wayland/pspec.xml +++ b/desktop/toolkit/qt5/qt5-wayland/pspec.xml @@ -85,6 +85,13 @@ + + 2023-11-11 + 5.15.11 + Rebuild + Mustafa Cinasal + muscnsl@gmail.com + 2023-10-07 5.15.11