Date: Tuesday, August 17, 2021 @ 10:19:19 Author: felixonmars Revision: 1001299
upgpkg: deepin-qt5platform-plugins 5.0.40-1 Modified: deepin-qt5platform-plugins/trunk/PKGBUILD Deleted: deepin-qt5platform-plugins/trunk/deepin-only.patch deepin-qt5platform-plugins/trunk/fix-crasher.patch -------------------+ PKGBUILD | 18 +------ deepin-only.patch | 46 ------------------- fix-crasher.patch | 121 ---------------------------------------------------- 3 files changed, 4 insertions(+), 181 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-08-17 10:19:01 UTC (rev 1001298) +++ PKGBUILD 2021-08-17 10:19:19 UTC (rev 1001299) @@ -1,8 +1,8 @@ # Maintainer: Felix Yan <[email protected]> pkgname=deepin-qt5platform-plugins -pkgver=5.0.23 -pkgrel=3 +pkgver=5.0.40 +pkgrel=1 pkgdesc='Qt platform plugins for DDE' arch=('x86_64') url="https://github.com/linuxdeepin/qt5platform-plugins" @@ -13,22 +13,12 @@ depends=('cairo' 'deepin-wayland' 'kwayland' 'qt5-x11extras') makedepends=('expac' 'qt5-xcb-private-headers' 'libglvnd' 'libxcb') groups=('deepin') -source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5platform-plugins/archive/$pkgver.tar.gz" - 'fix-crasher.patch' - 'deepin-only.patch') -sha512sums=('0efc4294829d39f599c26f9ab6cfa9da93ede9723b7238a1dde0b30b0ed79bbe5c17b8ab35f9fd5e87dcd3ccfb17e245b4aa0f1f67e6aea424f58061bd833aeb' - 'fb49ed1bff09b21e6f42f550002fef5dbff7c9913a6ebd839441eba5fa708d7a60d850c4608637f3edb9a7d428778facd7d065c313c9f29988a34338df9151ee' - 'f36b079226bdd2917fa91c91d577eb03e43b7c20526079afb95304019d91d3a254e1b6cff60e86749a31eac56cf676c0f0b989a8aa16ab48bb272c948a3afcb9') +source=("https://github.com/linuxdeepin/qt5platform-plugins/archive/$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('7541454b267c3cb3162a632b8fa20142226debc6360b6491db668610040c0773d21f85d9128455260a6d9c1f94a45f6d7b8b37ba18bd51b33fbf505d901ae88e') prepare() { cd qt5platform-plugins-$pkgver - # Upstream fix for the crashes in krita and rapid-photo-downloader - patch -Np1 -i ../fix-crasher.patch - - # Upstream change to only enable dxcb in dde - patch -Np1 -i ../deepin-only.patch - rm -r xcb/libqt5xcbqpa-dev wayland/qtwayland-dev sed -i 's|error(Not support Qt Version: .*)|INCLUDEPATH += /usr/include/qtxcb-private|' xcb/linux.pri Deleted: deepin-only.patch =================================================================== --- deepin-only.patch 2021-08-17 10:19:01 UTC (rev 1001298) +++ deepin-only.patch 2021-08-17 10:19:19 UTC (rev 1001299) @@ -1,46 +0,0 @@ -From b41d5c11f626c00bafc226db4d5a72b30cad01d4 Mon Sep 17 00:00:00 2001 -From: justforlxz <[email protected]> -Date: Thu, 18 Mar 2021 12:43:50 +0800 -Subject: [PATCH] refactor: Only enable dxcb in dde - -The default use of dxcb may affect other programs - -Issue: Fixes https://github.com/linuxdeepin/qt5integration/issues/41 -Issue: Fixes https://github.com/keepassxreboot/keepassxc/issues/6277 -Log: -Change-Id: I465e98128c8374b43197377f10a299601d3618b4 ---- - xcb/main.cpp | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/xcb/main.cpp b/xcb/main.cpp -index ee8ded4..ceb5fd4 100644 ---- a/xcb/main.cpp -+++ b/xcb/main.cpp -@@ -36,16 +36,21 @@ class DPlatformIntegrationPlugin : public QPlatformIntegrationPlugin - QPlatformIntegration* DPlatformIntegrationPlugin::create(const QString& system, const QStringList& parameters, int &argc, char **argv) - { - #ifdef Q_OS_LINUX -+ bool loadDXcb = false; -+ - if (qEnvironmentVariableIsSet("D_DXCB_DISABLE")) { -- return new DPlatformIntegrationParent(parameters, argc, argv); -+ loadDXcb = false; -+ } else if (system == "dxcb") { -+ loadDXcb = true; -+ } else if (QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin")) { -+ loadDXcb = true; - } - -- if (system == "dxcb" || system == "xcb") { -- return new DPlatformIntegration(parameters, argc, argv); -- } -+ return loadDXcb ? new DPlatformIntegration(parameters, argc, argv) -+ : new DPlatformIntegrationParent(parameters, argc, argv); - #endif - -- return 0; -+ return nullptr; - } - - QT_END_NAMESPACE Deleted: fix-crasher.patch =================================================================== --- fix-crasher.patch 2021-08-17 10:19:01 UTC (rev 1001298) +++ fix-crasher.patch 2021-08-17 10:19:19 UTC (rev 1001299) @@ -1,121 +0,0 @@ -From de6c9f3e735403077d66e8c8e9acfe236f06d6f5 Mon Sep 17 00:00:00 2001 -From: zccrs <[email protected]> -Date: Fri, 15 Jan 2021 10:28:34 +0800 -Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B9=B3=E5=8F=B0=E6=8F=92?= - =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E6=94=AF=E6=8C=81=E5=A4=9A=E6=AC=A1=E5=88=9B?= - =?UTF-8?q?=E5=BB=BA=E4=BD=BF=E7=94=A8?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -主要是为了支持在程序运行期间销毁并重新创建QGuiApplication -对象的场景, 如在deepin-turbo的booster中会预先创建一个 -QGuiApplication对象(主要是预加载数据), 之后可能会删除这个 -对象, 当booster开始加载一个程序时, 在程序的代码中会再次创建 -QGuiApplication对象. - -Log: -Change-Id: Ie9811910d86945aa26b8ebb111d57b4bfdccdaf7 ---- - src/vtablehook.h | 6 ++++++ - xcb/dhighdpi.cpp | 19 +++++++++++++++---- - xcb/dplatformintegration.cpp | 14 +++++++++----- - 3 files changed, 30 insertions(+), 9 deletions(-) - -diff --git a/src/vtablehook.h b/src/vtablehook.h -index b1e73f0..ea7c51f 100644 ---- a/src/vtablehook.h -+++ b/src/vtablehook.h -@@ -72,6 +72,12 @@ class VtableHook - static bool hasVtable(const void *obj); - static void resetVtable(const void *obj); - static quintptr resetVfptrFun(const void *obj, quintptr functionOffset); -+ template <typename Fun> // for class -+ static inline quintptr resetVfptrFun(Fun fun) -+ { -+ typedef QtPrivate::FunctionPointer<Fun> FunInfo; -+ return resetVfptrFun(getVtableOfClass<typename FunInfo::Object>(), toQuintptr(&fun)); -+ } - static quintptr originalFun(const void *obj, quintptr functionOffset); - static bool forceWriteMemory(void *adr, const void *data, size_t length); - static QFunctionPointer resolve(const char *symbol); -diff --git a/xcb/dhighdpi.cpp b/xcb/dhighdpi.cpp -index 1f54d49..c507676 100644 ---- a/xcb/dhighdpi.cpp -+++ b/xcb/dhighdpi.cpp -@@ -43,11 +43,16 @@ QPointF DHighDpi::fromNativePixels(const QPointF &pixelPoint, const QWindow *win - return QHighDpi::fromNativePixels(pixelPoint, window); - } - --__attribute__((constructor)) // 在库被加载时就执行此函数 --static void init() -+inline static void init() - { -+ // 禁用platform theme中的缩放机制 -+ // 当DHighDpi存在时不应该再使用这个过时的机制 -+ qputenv("D_DISABLE_RT_SCREEN_SCALE", "1"); -+ - DHighDpi::init(); - } -+// 在插件被加载时先做一次初始化 -+Q_CONSTRUCTOR_FUNCTION(init) - void DHighDpi::init() - { - if (QGuiApplication::testAttribute(Qt::AA_DisableHighDpiScaling) -@@ -57,11 +62,17 @@ void DHighDpi::init() - || !DXcbXSettings::getOwner() - || (qEnvironmentVariableIsSet("QT_SCALE_FACTOR_ROUNDING_POLICY") - && qgetenv("QT_SCALE_FACTOR_ROUNDING_POLICY") != "PassThrough")) { -+ // init函数可能会被重复调用, 此处应该清理VtableHook -+ if (active) { -+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) -+ VtableHook::resetVfptrFun(&QXcbScreen::pixelDensity); -+#endif -+ VtableHook::resetVfptrFun(&QXcbScreen::logicalDpi); -+ active = false; -+ } - return; - } - -- // 禁用platform theme中的缩放机制 -- qputenv("D_DISABLE_RT_SCREEN_SCALE", "1"); - // 设置为完全控制缩放比例,避免被Qt“4舍5入”了缩放比 - qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY", "PassThrough"); - -diff --git a/xcb/dplatformintegration.cpp b/xcb/dplatformintegration.cpp -index faa2c9b..aca0bcd 100644 ---- a/xcb/dplatformintegration.cpp -+++ b/xcb/dplatformintegration.cpp -@@ -116,16 +116,19 @@ DPlatformIntegration::DPlatformIntegration(const QStringList ¶meters, int &a - VtableHook::overrideVfptrFun(nativeInterface(), - &QPlatformNativeInterface::platformFunction, - &DPlatformNativeInterfaceHook::platformFunction); -+ -+ // 不仅仅需要在插件被加载时初始化, 也有可能DPlatformIntegration会被创建多次, 也应当在 -+ // DPlatformIntegration每次被创建时都重新初始化DHighDpi. -+ DHighDpi::init(); - } - - DPlatformIntegration::~DPlatformIntegration() - { - #ifdef Q_OS_LINUX -- if (!m_eventFilter) -- return; -- -- qApp->removeNativeEventFilter(m_eventFilter); -- delete m_eventFilter; -+ if (m_eventFilter) { -+ qApp->removeNativeEventFilter(m_eventFilter); -+ delete m_eventFilter; -+ } - #endif - - #ifdef USE_NEW_IMPLEMENTING -@@ -134,6 +137,7 @@ DPlatformIntegration::~DPlatformIntegration() - - if (m_xsettings) { - delete m_xsettings; -+ m_xsettings = nullptr; - } - #endif - }
