init debian 5.15.10

This commit is contained in:
韩品龙 2023-11-20 09:40:11 +08:00
parent 0ebd5bfc21
commit d1a54b2f74
72 changed files with 1411 additions and 4833 deletions

180
debian/changelog vendored
View File

@ -1,81 +1,157 @@
qtbase-opensource-src (5.15.8+dfsg-ok2.3) nile; urgency=medium
qtbase-opensource-src (5.15.10+dfsg-3ok1) nile; urgency=medium
* BUG号
#I79FD0【文件管理器】【wayland】侧边栏悬停显示位置不正确
* 需求号:无
* 其他更改:
* rebuild for openKylin
-- liuyapeng <liuyapeng@kylinos.cn> Wed, 08 Nov 2023 17:39:16 +0800
qtbase-opensource-src (5.15.8+dfsg-ok2.2) nile; urgency=medium
* BUG号
* 需求号:无
* 其他更改合并触摸相关Patch
-- hanpinlong <hanpinlong@kylinos.cn> Mon, 30 Oct 2023 09:49:49 +0800
-- hanpinlong <hanpinlong@kylinos.cn> Wed, 25 Oct 2023 16:01:36 +0800
qtbase-opensource-src (5.15.8+dfsg-ok1.9) nile; urgency=medium
qtbase-opensource-src (5.15.10+dfsg-3) unstable; urgency=medium
* BUG号
* 需求号:无
* 其他更改rebuild
[ Pino Toscano ]
* Drop the support for the dead GNU/kFreeBSD:
- drop the patches gnukfreebsd.diff, and nonlinux_utime.diff, as they only
apply changes to that OS
- drop installed files added by them
- drop the kfreebsd-any qualifiers from the firebird-dev, and libgbm-dev
build dependencies
- drop the kfreebsd-any qualifiers from binary packages
- drop the kfreebsd-any qualifiers in install files
- drop the kfreebsd qualifiers in symbols files
* More changes to symbols files:
- set a symbol as linux-any, as it is Linux-specific
- drop mips, and powerpcspe qualifiers, as those architectures are long dead
* Remove 2 obsolete maintscript entries in 2 files.
-- hanpinlong <hanpinlong@kylinos.cn> Fri, 27 Oct 2023 10:31:39 +0800
[ Dmitry Shachnev ]
* Backport upstream patches to make QXmlStreamReaderPrivate::fastScanName
indicate parsing status to callers (CVE-2023-37369).
* Backport upstream patch to make QXmlStreamReader raise error on unexpected
tokens (CVE-2023-38197, closes: #1041105).
qtbase-opensource-src (5.15.8+dfsg-ok1.8) nile; urgency=medium
-- Dmitry Shachnev <mitya57@debian.org> Thu, 27 Jul 2023 23:01:32 +0300
* BUG号
#I79FD0【文件管理器】【wayland】侧边栏悬停显示位置不正确
* 需求号:无
* 其他更改:
qtbase-opensource-src (5.15.10+dfsg-2) unstable; urgency=medium
-- liuyapeng <liuyapeng@kylinos.cn> Fri, 13 Oct 2023 15:33:11 +0800
* Merge 5.15.8+dfsg-13 upload from unstable.
* Upload to unstable.
qtbase-opensource-src (5.15.8+dfsg-ok1.7) yangtze; urgency=medium
-- Dmitry Shachnev <mitya57@debian.org> Sat, 08 Jul 2023 09:54:13 +0300
* BUG号
#I72AE6【显示器】连接投影仪扩展模式锁屏、登录、电源管理界面均移位
* 需求号:无
* 其他更改:
qtbase-opensource-src (5.15.10+dfsg-1) experimental; urgency=medium
-- hanpinlong <hanpinlong@kylinos.cn> Mon, 19 Jun 2023 14:57:14 +0800
* New upstream release.
* Drop patches, included in the new release:
- fix_recursion_crash.diff
- mysql_field_readonly.diff
- revert_wm_state.diff
- recreate_xcb_window.diff
* Bump ABI version to qtbase-abi-5-15-10.
qtbase-opensource-src (5.15.8+dfsg-ok1.6) yangtze; urgency=medium
-- Dmitry Shachnev <mitya57@debian.org> Fri, 09 Jun 2023 11:08:39 +0300
* BUG号
#I72DC0:【X】【触摸】【次要】文件管理器界面触控笔偏移
#I72CCL:【X】【触摸】触摸屏pc模式下触控笔单击功能失效
#I729NF:【X】【触摸】触控笔点击按钮时画面按钮动画卡顿不生效
* 需求号:无
* 其他更改: 修复 xcb 上高 dpi 时触控笔坐标异常
qtbase-opensource-src (5.15.9+dfsg-3) experimental; urgency=medium
-- hanpinlong <hanpinlong@kylinos.cn> Thu, 25 May 2023 11:15:52 +0800
* Merge 5.15.8+dfsg-12 upload from unstable, bringing CVE fixes.
qtbase-opensource-src (5.15.8+dfsg-ok1.5build1) yangtze; urgency=medium
-- Dmitry Shachnev <mitya57@debian.org> Thu, 08 Jun 2023 10:46:52 +0300
* BUG号
-I72L6W【X】【触摸】桌面触摸长按出现右键菜单之后桌面触摸失效任务栏触摸正常
-I62AWQ x11模式下触屏控制打开文件管理器空白处右键触发菜单后单击左侧选项无响应
* 需求号:无
* 其他更改: 合并触摸patch
qtbase-opensource-src (5.15.9+dfsg-2) experimental; urgency=medium
-- hanpinlong <hanpinlong@kylinos.cn> Wed, 24 May 2023 13:43:15 +0800
* Bump years for 3rdparty copyright.
* Backport upstream patch to stop using O_PATH in OpenFile portal
(LP: #1876237).
* Add a patch to fix capitalization error in auto-generated qdbusmacros.h
include (LP: #2016703).
* Make qtbase5-private-dev suggest packages providing includes which are
used by some of its headers (closes: #1034830).
-- Dmitry Shachnev <mitya57@debian.org> Sat, 13 May 2023 18:27:14 +0300
qtbase-opensource-src (5.15.8+dfsg-ok1.2) yangtze; urgency=medium
qtbase-opensource-src (5.15.9+dfsg-1) experimental; urgency=medium
* rebuild
* New upstream release.
* Drop CVE-2022-25255.diff, included in the new release.
* Refresh other patches.
* Bump ABI version to qtbase-abi-5-15-9.
* Update debian/copyright using debian/scripts/update-copyright.
* Fix use of transitional packages in Build-Depends and Depends:
- libfontconfig1-dev => libfontconfig-dev
- libfreetype6-dev => libfreetype-dev
* Update a11y_root.diff to the version which was applied upstream.
* Drop qt5-flatpak-platformtheme transitional package.
* Drop Breaks/Replaces for pre-Bullseye versions.
-- hanpinlong <hanpinlong@kylinos.cn> Sat, 06 May 2023 10:19:24 +0800
-- Dmitry Shachnev <mitya57@debian.org> Sat, 15 Apr 2023 15:40:16 +0300
qtbase-opensource-src (5.15.8+dfsg-13) unstable; urgency=medium
qtbase-opensource-src (5.15.8+dfsg-ok1.1) yangtze; urgency=medium
[ Alexander Volkov ]
* Backport upstream patches to fix regression caused by CVE-2023-24607.diff.
* rebuild for kylin
-- Dmitry Shachnev <mitya57@debian.org> Wed, 05 Jul 2023 23:13:01 +0300
-- hanpinlong <hanpinlong@kylinos.cn> Mon, 27 Mar 2023 14:52:32 +0800
qtbase-opensource-src (5.15.8+dfsg-12) unstable; urgency=medium
* Backport upstream patch to fix CVE-2023-34410 (closes: #1037210).
- Note: this is the second patch related to that CVE; the first one
is for Schannel code which is Windows-only, so we don't need it.
-- Dmitry Shachnev <mitya57@debian.org> Thu, 08 Jun 2023 10:37:43 +0300
qtbase-opensource-src (5.15.8+dfsg-11) unstable; urgency=medium
* Rename the patches for consistency and add DEP-3 headers.
* Add a patch to fix buffer overflow in QDnsLookup (CVE-2023-33285).
-- Dmitry Shachnev <mitya57@debian.org> Thu, 25 May 2023 13:45:05 +0300
qtbase-opensource-src (5.15.8+dfsg-10) unstable; urgency=medium
* Add patches to fix CVE-2023-32762 and CVE-2023-32763.
-- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org> Mon, 22 May 2023 11:31:55 -0300
qtbase-opensource-src (5.15.8+dfsg-9) unstable; urgency=medium
* Backport upstream patch to fix laggy drag-and-drop with KWin. See:
- https://bugreports.qt.io/browse/QTBUG-98048
- https://lists.debian.org/debian-kde/2022/11/msg00019.html
-- Dmitry Shachnev <mitya57@debian.org> Sun, 21 May 2023 12:19:31 +0300
qtbase-opensource-src (5.15.8+dfsg-8) unstable; urgency=medium
* Add back Breaks/Replaces for libqtcore4 (closes: #1035790).
-- Dmitry Shachnev <mitya57@debian.org> Sat, 13 May 2023 14:12:14 +0300
qtbase-opensource-src (5.15.8+dfsg-7) unstable; urgency=medium
* Update a11y_root.diff. This time the code waits for Qt loop to process the
check (Closes: #1033995, #1034160, #1034271).
-- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org> Wed, 12 Apr 2023 20:24:34 -0300
qtbase-opensource-src (5.15.8+dfsg-6) unstable; urgency=medium
* Use the new, fixed version of a11y_root.diff from Samuel Thibault
(again closes: #1033995).
-- Dmitry Shachnev <mitya57@debian.org> Tue, 11 Apr 2023 14:25:22 +0300
qtbase-opensource-src (5.15.8+dfsg-5) unstable; urgency=medium
* Revert the last upload. Unfortunately, it caused regressions
(closes: #1034160, #1034169, #1034191).
-- Dmitry Shachnev <mitya57@debian.org> Mon, 10 Apr 2023 23:58:16 +0300
qtbase-opensource-src (5.15.8+dfsg-4) unstable; urgency=medium
* Add a patch to fix accessibility on XCB when running as root
(closes: #1033995).
-- Dmitry Shachnev <mitya57@debian.org> Sun, 09 Apr 2023 21:23:36 +0300
qtbase-opensource-src (5.15.8+dfsg-3) unstable; urgency=medium

49
debian/control vendored
View File

@ -11,7 +11,7 @@ Uploaders: Sune Vuorela <sune@debian.org>,
Build-Depends: debhelper-compat (= 13),
default-libmysqlclient-dev,
dh-exec,
firebird-dev [kfreebsd-any linux-any],
firebird-dev [linux-any],
freetds-dev,
libasound2-dev [linux-any],
libatspi2.0-dev,
@ -19,9 +19,9 @@ Build-Depends: debhelper-compat (= 13),
libdbus-1-dev,
libdouble-conversion-dev,
libdrm-dev [linux-any],
libfontconfig1-dev,
libfreetype6-dev,
libgbm-dev [linux-any kfreebsd-any],
libfontconfig-dev,
libfreetype-dev,
libgbm-dev [linux-any],
libgl-dev,
libgles-dev,
libglib2.0-dev,
@ -85,7 +85,7 @@ Package: libqt5core5a
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Provides: qtbase-abi-5-15-8
Provides: qtbase-abi-5-15-10
Depends: shared-mime-info, ${misc:Depends}, ${shlibs:Depends}
Recommends: qttranslations5-l10n
Suggests: libthai0
@ -121,18 +121,6 @@ Description: Qt 5 GTK+ 3 platform theme
This package provides the GTK+ 3 platform theme, which makes Qt use
native icon themes, fonts, and dialogs on GTK-based environments.
Package: qt5-flatpak-platformtheme
Architecture: any
Multi-Arch: same
Section: oldlibs
Depends: qt5-xdgdesktopportal-platformtheme (= ${binary:Version}),
${misc:Depends}
Description: Qt 5 Flatpak platform theme (transitional package)
Qt is a cross-platform C++ application framework. Qt's primary feature
is its rich set of widgets that provide standard GUI functionality.
.
This is a transitional package which can safely be removed.
Package: qt5-xdgdesktopportal-platformtheme
Architecture: any
Multi-Arch: same
@ -177,7 +165,7 @@ Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: libqt5sql5-sqlite | libqt5sql5-mysql | libqt5sql5-odbc | libqt5sql5-psql | libqt5sql5-tds | libqt5sql5-ibase [kfreebsd-any linux-any]
Recommends: libqt5sql5-sqlite | libqt5sql5-mysql | libqt5sql5-odbc | libqt5sql5-psql | libqt5sql5-tds | libqt5sql5-ibase [linux-any]
Description: Qt 5 SQL module
Qt is a cross-platform C++ application framework. Qt's primary feature
is its rich set of widgets that provide standard GUI functionality.
@ -241,7 +229,7 @@ Description: Qt 5 FreeTDS database driver
MS SQL or Sybase SQL server.
Package: libqt5sql5-ibase
Architecture: kfreebsd-any linux-any
Architecture: linux-any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}, ${shlibs:Depends}
@ -357,8 +345,7 @@ Suggests: default-libmysqlclient-dev,
libpq-dev,
libsqlite3-dev,
unixodbc-dev
Breaks: qt5-default (<< 5.15.1+dfsg-2~), qtbase5-dev-tools (<< 5.12.5+dfsg-3~)
Replaces: qtbase5-dev-tools (<< 5.12.5+dfsg-3~)
Breaks: qt5-default (<< 5.15.1+dfsg-2~)
Conflicts: qtbase5-gles-dev
Description: Qt 5 base development files
Qt is a cross-platform C++ application framework. Qt's primary feature
@ -374,11 +361,27 @@ Package: qtbase5-private-dev
Architecture: any
Multi-Arch: same
Section: libdevel
Depends: libfontconfig1-dev,
Depends: libfontconfig-dev,
libinput-dev [linux-any],
libxkbcommon-dev,
qtbase5-dev (= ${binary:Version}),
${misc:Depends}
Suggests: libatspi2.0-dev,
libcups2-dev,
libdouble-conversion-dev,
libdrm-dev [linux-any],
libharfbuzz-dev,
libicu-dev,
libqt5opengl5-dev (= ${binary:Version}),
libssl-dev,
libxcb-image0-dev,
libxcb-keysyms1-dev,
libxcb-randr0-dev,
libxcb-sync-dev,
libxcb-xfixes0-dev,
libxcb-xinerama0-dev,
libxcb-xkb-dev,
libxkbcommon-x11-dev
Conflicts: qtbase5-private-gles-dev
Description: Qt 5 base private development files
Qt is a cross-platform C++ application framework. Qt's primary feature
@ -499,8 +502,6 @@ Build-Profiles: <!nodoc>
Architecture: all
Section: libdevel
Depends: ${misc:Depends}
Breaks: qtbase5-doc-html (<< 5.12.5+dfsg-5~)
Replaces: qtbase5-doc-html (<< 5.12.5+dfsg-5~)
Multi-Arch: foreign
Description: Qt 5 base tags files
Qt is a cross-platform C++ application framework. Qt's primary feature

22
debian/copyright vendored
View File

@ -495,7 +495,7 @@ Files: configure
tests/auto/testlib/selftests/tst_selftests.cpp
tests/benchmarks/corelib/text/qbytearray/main.cpp
tests/benchmarks/corelib/tools/qhash/main.cpp
Copyright: 2016-2020 Intel Corporation
Copyright: 2016-2022 Intel Corporation
2016-2021 The Qt Company Ltd.
License: GPL-3 with Qt-1.0 exception
@ -930,7 +930,7 @@ Files: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
src/plugins/platforms/android/qandroidinputcontext.cpp
Copyright: 2012-2017 BogDan Vatra <bogdan@kde.org>
2016 Olivier Goffart <ogoffart@woboq.com>
2016 The Qt Company Ltd.
2016-2022 The Qt Company Ltd.
License: LGPL-3 or GPL-2
Files: src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java
@ -956,7 +956,7 @@ Files: src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java
src/plugins/platforms/android/qandroidplatformwindow.cpp
src/plugins/platforms/android/qandroidplatformwindow.h
Copyright: 2012-2016 BogDan Vatra <bogdan@kde.org>
2016-2021 The Qt Company Ltd.
2016-2022 The Qt Company Ltd.
License: LGPL-3 or GPL-2
Files: src/testlib/qteamcitylogger.cpp
@ -1318,8 +1318,8 @@ Files: bin/syncqt.pl
src/testlib/qtest.h
src/testlib/qtestcase.cpp
src/widgets/kernel/qwidget.cpp
Copyright: 2015-2020 Intel Corporation
2016-2020 The Qt Company Ltd.
Copyright: 2015-2022 Intel Corporation
2016-2022 The Qt Company Ltd.
License: LGPL-3 or GPL-2
Files: src/corelib/text/qbytearraylist.h
@ -2156,11 +2156,11 @@ License: ICC
profile.
Files: src/3rdparty/libjpeg/src/*
Copyright: 2009-2021 D. R. Commander
Copyright: 2009-2022 D. R. Commander
2011-2016 Siarhei Siamashka
2015-2016, 2018 Matthieu Darbois
2015 Intel Corporation
2015-2020 Google, Inc.
2015-2022 Google, Inc.
2013-2014 MIPS Technologies, Inc.
2013-2014 Linaro Limited
2009-2011 Nokia Corporation and/or its subsidiary(-ies)
@ -2215,8 +2215,8 @@ Copyright: 2005 The Android Open Source Project
License: Apache-2.0
Files: src/3rdparty/pcre2/src/*
Copyright: 1997-2021 University of Cambridge
2009-2021 Zoltan Herczeg
Copyright: 1997-2022 University of Cambridge
2009-2022 Zoltan Herczeg
License: BSD-3-clause
Files: src/3rdparty/pcre2/src/sljit/*
@ -2278,8 +2278,8 @@ License: Bitstream
Files: src/3rdparty/freetype/src/gzip/*
src/3rdparty/zlib/src/*
Copyright: 1995-2017 Jean-loup Gailly
1995-2017 Mark Adler
Copyright: 1995-2022 Jean-loup Gailly
1995-2022 Mark Adler
License: Zlib
Files: src/3rdparty/md4c/*

1
debian/files vendored Normal file
View File

@ -0,0 +1 @@
qtbase-opensource-src_5.15.10+dfsg-3ok1_source.buildinfo libs optional

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.1 amd64 i386
libQt5Concurrent.so.5 libqt5concurrent5 #MINVER#
| libqt5concurrent5 #MINVER#, qtbase-abi-5-15-8
| libqt5concurrent5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1 +0,0 @@
rm_conffile /etc/xdg/QtProject/qtlogging.ini 5.9.2+dfsg-7~ libqt5core5a

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.6 ia64 sparc64
libQt5Core.so.5 libqt5core5a #MINVER#
| libqt5core5a #MINVER#, qtbase-abi-5-15-8
| libqt5core5a #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0
@ -27,14 +27,14 @@ libQt5Core.so.5 libqt5core5a #MINVER#
_Z10qShapeItemP14HB_ShaperItem_@Qt_5 5.0.2
_Z10qTerminatev@Qt_5 5.0.2
(arch=sh4)_Z10qvsnprintfPcjPKc13__va_list_tag@Qt_5 5.4.2
(arch=hppa m68k mips mipsel)_Z10qvsnprintfPcjPKcPv@Qt_5 5.4.2
(arch=hurd-i386 i386 kfreebsd-i386)_Z10qvsnprintfPcjPKcS_@Qt_5 5.2.0
(arch=hppa m68k mipsel)_Z10qvsnprintfPcjPKcPv@Qt_5 5.4.2
(arch=hurd-i386 i386)_Z10qvsnprintfPcjPKcS_@Qt_5 5.2.0
(arch=armel armhf)_Z10qvsnprintfPcjPKcSt9__va_list@Qt_5 5.2.0
(arch=alpha)_Z10qvsnprintfPcmPKc13__va_list_tag@Qt_5 5.1.0
(arch=ia64 mips64el riscv64 sparc64)_Z10qvsnprintfPcmPKcPv@Qt_5 5.11.1
(arch=ppc64 ppc64el)_Z10qvsnprintfPcmPKcS_@Qt_5 5.3.1
(arch=arm64)_Z10qvsnprintfPcmPKcSt9__va_list@Qt_5 5.3.0
(arch=amd64 kfreebsd-amd64 powerpc powerpcspe s390x x32|subst)_Z10qvsnprintfPc{size_t}PKcP13__va_list_tag@Qt_5 5.3.1
(arch=amd64 powerpc s390x x32|subst)_Z10qvsnprintfPc{size_t}PKcP13__va_list_tag@Qt_5 5.3.1
_Z10scientificR11QTextStream@Qt_5 5.0.2
_Z11noforcesignR11QTextStream@Qt_5 5.0.2
_Z11qFpClassifyd@Qt_5 5.14.1
@ -95,7 +95,7 @@ libQt5Core.so.5 libqt5core5a #MINVER#
_Z23qt_qFindChildren_helperPK7QObjectRK7QStringRK11QMetaObjectP5QListIPvE6QFlagsIN2Qt15FindChildOptionEE@Qt_5 5.0.2
_Z24qGlobalPostedEventsCountv@Qt_5 5.0.2
_Z24qcoreStateMachineHandlerv@Qt_5 5.0.2
(arch=!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386)_Z24qt_linux_find_symbol_sysPKc@Qt_5 5.0.2
(arch=linux-any)_Z24qt_linux_find_symbol_sysPKc@Qt_5 5.0.2
_Z24qt_subtract_from_timeoutii@Qt_5 5.4.2
_Z25qEnvironmentVariableIsSetPKc@Qt_5 5.0.2
(subst)_Z26qCalculateGrowingBlockSize{size_t}{size_t}{size_t}@Qt_5 5.7.1
@ -144,9 +144,9 @@ libQt5Core.so.5 libqt5core5a #MINVER#
_Z5qHashRK9QUrlQueryj@Qt_5 5.6.0~beta
_Z5qHashRKN10QByteArray16FromBase64ResultEj@Qt_5 5.15.1
_Z5qHashdj@Qt_5 5.3.0
(arch=!alpha !powerpc !powerpcspe !ppc64 !ppc64el !s390x)_Z5qHashej@Qt_5 5.3.0
(arch=!alpha !powerpc !ppc64 !ppc64el !s390x)_Z5qHashej@Qt_5 5.3.0
_Z5qHashfj@Qt_5 5.3.0
(arch=alpha powerpc powerpcspe ppc64 ppc64el s390x)_Z5qHashgj@Qt_5 5.6.1
(arch=alpha powerpc ppc64 ppc64el s390x)_Z5qHashgj@Qt_5 5.6.1
_Z5qQNaNv@Qt_5 5.0.2
_Z5qSNaNv@Qt_5 5.0.2
_Z5qdtoadPiS_@Qt_5 5.7.0
@ -2611,15 +2611,15 @@ libQt5Core.so.5 libqt5core5a #MINVER#
_ZN7QString8fromUcs4EPKji@Qt_5 5.0.2
_ZN7QString8truncateEi@Qt_5 5.0.2
(arch=alpha sh4)_ZN7QString8vsprintfEPKc13__va_list_tag@Qt_5 5.4.2
(arch=amd64 kfreebsd-amd64 powerpc powerpcspe s390x x32)_ZN7QString8vsprintfEPKcP13__va_list_tag@Qt_5 5.3.1
(arch=hurd-i386 i386 kfreebsd-i386 ppc64 ppc64el)_ZN7QString8vsprintfEPKcPc@Qt_5 5.3.1
(arch=hppa ia64 m68k mips mips64el mipsel riscv64 sparc64)_ZN7QString8vsprintfEPKcPv@Qt_5 5.11.1
(arch=amd64 powerpc s390x x32)_ZN7QString8vsprintfEPKcP13__va_list_tag@Qt_5 5.3.1
(arch=hurd-i386 i386 ppc64 ppc64el)_ZN7QString8vsprintfEPKcPc@Qt_5 5.3.1
(arch=hppa ia64 m68k mips64el mipsel riscv64 sparc64)_ZN7QString8vsprintfEPKcPv@Qt_5 5.11.1
(arch=arm64 armel armhf)_ZN7QString8vsprintfEPKcSt9__va_list@Qt_5 5.3.0
_ZN7QString9fromUtf16EPKti@Qt_5 5.0.2
(arch=alpha sh4)_ZN7QString9vasprintfEPKc13__va_list_tag@Qt_5 5.9.1
(arch=amd64 kfreebsd-amd64 powerpc powerpcspe s390x x32)_ZN7QString9vasprintfEPKcP13__va_list_tag@Qt_5 5.6.1
(arch=hurd-i386 i386 kfreebsd-i386 ppc64 ppc64el)_ZN7QString9vasprintfEPKcPc@Qt_5 5.5.0
(arch=hppa ia64 m68k mips mips64el mipsel riscv64 sparc64)_ZN7QString9vasprintfEPKcPv@Qt_5 5.11.1
(arch=amd64 powerpc s390x x32)_ZN7QString9vasprintfEPKcP13__va_list_tag@Qt_5 5.6.1
(arch=hurd-i386 i386 ppc64 ppc64el)_ZN7QString9vasprintfEPKcPc@Qt_5 5.5.0
(arch=hppa ia64 m68k mips64el mipsel riscv64 sparc64)_ZN7QString9vasprintfEPKcPv@Qt_5 5.11.1
(arch=arm64 armel armhf)_ZN7QString9vasprintfEPKcSt9__va_list@Qt_5 5.5.0
_ZN7QStringC1E5QChar@Qt_5 5.0.2
_ZN7QStringC1EPK5QChari@Qt_5 5.0.2
@ -5024,7 +5024,7 @@ libQt5Core.so.5 libqt5core5a #MINVER#
(optional=templinst)_ZNSt10_HashtableI7QStringS0_NSt3pmr21polymorphic_allocatorIS0_EENSt8__detail9_IdentityESt8equal_toIS0_ESt4hashIS0_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev@Qt_5 5.15.1
(optional=templinst|arch=ia64)_ZNSt17_Temporary_bufferIPiiEC1ES0_l@Qt_5 5.14.2
(optional=templinst|arch=ia64)_ZNSt17_Temporary_bufferIPiiEC2ES0_l@Qt_5 5.14.2
(optional=templinst|arch=armel armhf hppa hurd-i386 i386 kfreebsd-i386 m68k mipsel powerpc sh4 x32)_ZNSt23mersenne_twister_engineIjLj32ELj624ELj397ELj31ELj2567483615ELj11ELj4294967295ELj7ELj2636928640ELj15ELj4022730752ELj18ELj1812433253EE11_M_gen_randEv@Qt_5 5.11.1
(optional=templinst|arch=armel armhf hppa hurd-i386 i386 m68k mipsel powerpc sh4 x32)_ZNSt23mersenne_twister_engineIjLj32ELj624ELj397ELj31ELj2567483615ELj11ELj4294967295ELj7ELj2636928640ELj15ELj4022730752ELj18ELj1812433253EE11_M_gen_randEv@Qt_5 5.11.1
(optional=templinst|arch=alpha amd64 arm64 ia64 mips64el ppc64 ppc64el riscv64 s390x sparc64)_ZNSt23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EE11_M_gen_randEv@Qt_5 5.11.3
(optional=templinst|subst)_ZNSt23mersenne_twister_engineIjL{size_t}32EL{size_t}624EL{size_t}397EL{size_t}31ELj2567483615EL{size_t}11ELj4294967295EL{size_t}7ELj2636928640EL{size_t}15ELj4022730752EL{size_t}18ELj1812433253EE4seedIN16QRandomGenerator15SystemGeneratorEEENSt9enable_ifIXsrSt6__and_IJSt6__not_ISt7is_sameINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeES0_EESt11is_unsignedINSA_11result_typeEES6_ISt14is_convertibleISA_jEEEE5valueEvE4typeERSA_@Qt_5 5.12.4
(optional=templinst|subst)_ZNSt23mersenne_twister_engineIjL{size_t}32EL{size_t}624EL{size_t}397EL{size_t}31ELj2567483615EL{size_t}11ELj4294967295EL{size_t}7ELj2636928640EL{size_t}15ELj4022730752EL{size_t}18ELj1812433253EE4seedISt8seed_seqEENSt9enable_ifIXsrSt6__and_IJSt6__not_ISt7is_sameINSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeES0_EESt11is_unsignedINS9_11result_typeEES5_ISt14is_convertibleIS9_jEEEE5valueEvE4typeERS9_@Qt_5 5.12.4

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.2 alpha amd64 arm64 hppa hurd-i386 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
libQt5DBus.so.5 libqt5dbus5 #MINVER#
| libqt5dbus5 #MINVER#, qtbase-abi-5-15-8
| libqt5dbus5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,20 +1,20 @@
#! /usr/bin/dh-exec
[!armel !armhf] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so
[any-i386] usr/lib/${DEB_HOST_MULTIARCH}/sse2/libQt5Gui.so.*
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFSDeviceIntegration.so.*
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFsKmsSupport.so.*
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-emu-integration.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-kms-integration.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-x11-integration.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/platforms/libqeglfs.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/platforms/libqminimalegl.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFSDeviceIntegration.so.*
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFsKmsSupport.so.*
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-emu-integration.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-kms-integration.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/egldeviceintegrations/libqeglfs-x11-integration.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/generic/libqevdevkeyboardplugin.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/generic/libqevdevmouseplugin.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/generic/libqevdevtabletplugin.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/generic/libqevdevtouchplugin.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/generic/libqlibinputplugin.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/platforms/libqeglfs.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/platforms/libqlinuxfb.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/platforms/libqminimalegl.so
usr/lib/${DEB_HOST_MULTIARCH}/libQt5Gui.so.*
usr/lib/${DEB_HOST_MULTIARCH}/libQt5XcbQpa.so.*
usr/lib/${DEB_HOST_MULTIARCH}/qt5/plugins/generic/libqtuiotouchplugin.so

View File

@ -1 +0,0 @@
rm_conffile /etc/X11/Xsession.d/90qt5-opengl 5.9.1+dfsg-10~

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.8 s390x
libQt5Gui.so.5 libqt5gui5 #MINVER# | libqt5gui5-gles #MINVER#
| libqt5gui5 #MINVER# | libqt5gui5-gles #MINVER#, qtbase-abi-5-15-8
| libqt5gui5 #MINVER# | libqt5gui5-gles #MINVER#, qtbase-abi-5-15-10
| libqt5gui5 #MINVER#
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
@ -95,7 +95,7 @@ libQt5Gui.so.5 libqt5gui5 #MINVER# | libqt5gui5-gles #MINVER#
_Z31QT_DISTANCEFIELD_HIGHGLYPHCOUNTv@Qt_5 5.8.0
(arch=arm64)_Z31qt_convert_rgb888_to_rgb32_neonPjPKhi@Qt_5 5.6.0~beta
_Z32qGamma_correct_back_to_linear_csP6QImage@Qt_5 5.0.2
(optional=gccinternal|arch=amd64 kfreebsd-amd64 x32)_Z32qt_convert_rgb888_to_rgb32_ssse3PjPKhi@Qt_5 5.0.2
(optional=gccinternal|arch=amd64 x32)_Z32qt_convert_rgb888_to_rgb32_ssse3PjPKhi@Qt_5 5.0.2
_Z33hb_qt_font_get_use_design_metricsP9hb_font_t@Qt_5 5.2.0
_Z33hb_qt_font_set_use_design_metricsP9hb_font_tj@Qt_5 5.2.0
_Z34qt_sort_families_by_writing_systemN5QChar6ScriptERK11QStringList@Qt_5 5.10.1

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.2 amd64 arm64 hppa i386 sh4 x32
libQt5Network.so.5 libqt5network5 #MINVER#
| libqt5network5 #MINVER#, qtbase-abi-5-15-8
| libqt5network5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.1 amd64 i386
libQt5OpenGL.so.5 libqt5opengl5 #MINVER#
| libqt5opengl5 #MINVER#, qtbase-abi-5-15-8
| libqt5opengl5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.1 amd64 i386
libQt5PrintSupport.so.5 libqt5printsupport5 #MINVER#
| libqt5printsupport5 #MINVER#, qtbase-abi-5-15-8
| libqt5printsupport5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.1 amd64 i386
libQt5Sql.so.5 libqt5sql5 #MINVER#
| libqt5sql5 #MINVER#, qtbase-abi-5-15-8
| libqt5sql5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.5 amd64 arm64 armel armhf hppa hurd-i386 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
libQt5Test.so.5 libqt5test5 #MINVER#
| libqt5test5 #MINVER#, qtbase-abi-5-15-8
| libqt5test5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.6 amd64 i386
libQt5Widgets.so.5 libqt5widgets5 #MINVER#
| libqt5widgets5 #MINVER#, qtbase-abi-5-15-8
| libqt5widgets5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

View File

@ -1,6 +1,6 @@
# SymbolsHelper-Confirmed: 5.15.6 amd64 i386
libQt5Xml.so.5 libqt5xml5 #MINVER#
| libqt5xml5 #MINVER#, qtbase-abi-5-15-8
| libqt5xml5 #MINVER#, qtbase-abi-5-15-10
* Build-Depends-Package: qtbase5-dev
Qt_5.0@Qt_5.0 5.6.0~beta
Qt_5.10@Qt_5.10 5.10.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,74 +0,0 @@
From: hanpinlong <hanpinlong@kylinos.cn>
Date: Wed, 24 May 2023 06:52:27 +0000
Subject: =?utf-8?q?!10_=E4=BF=AE=E6=94=B9changelog_Merge_pull_request_!10_f?=
=?utf-8?q?rom_hanpinlong/openkylin/yangtze?=
---
src/gui/kernel/qguiapplication.cpp | 1 +
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 25 +++++++++++++++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8282bd3..29e2e61 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3058,6 +3058,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
Qt::MouseButton button = Qt::NoButton;
Qt::MouseButtons buttons = Qt::LeftButton;
if (eventType == QEvent::TouchBegin && m_fakeMouseSourcePointId < 0)
+ || (touchPoints.count() == 1 && m_fakeMouseSourcePointId != touchPoints.first().id()))
m_fakeMouseSourcePointId = touchPoints.first().id();
for (const auto &touchPoint : touchPoints) {
if (touchPoint.id() == m_fakeMouseSourcePointId) {
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 27a2526..fb2a335 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -286,9 +286,11 @@ void QXcbConnection::xi2SetupDevices()
m_tabletData.clear();
#endif
m_scrollingDevices.clear();
- m_touchDevices.clear();
m_xiMasterPointerIds.clear();
+ // FIXBUG: #123235 触摸过程中插拔usb键盘/鼠标导致触摸失效
+ QList<quint16> deviceIds;
+
auto reply = Q_XCB_REPLY(xcb_input_xi_query_device, xcb_connection(), XCB_INPUT_DEVICE_ALL);
if (!reply) {
qCDebug(lcQpaXInputDevices) << "failed to query devices";
@@ -303,8 +305,21 @@ void QXcbConnection::xi2SetupDevices()
continue;
}
// only slave pointer devices are relevant here
- if (deviceInfo->type == XCB_INPUT_DEVICE_TYPE_SLAVE_POINTER)
- xi2SetupDevice(deviceInfo, false);
+
+ // FIXBUG: #123235 触摸过程中插拔usb键盘/鼠标导致触摸失效
+ if (deviceInfo->type == XCB_INPUT_DEVICE_TYPE_SLAVE_POINTER) {
+ if (!m_touchDevices.contains(deviceInfo->deviceid)) {
+ xi2SetupDevice(deviceInfo, false);
+ }
+ deviceIds.append(deviceInfo->deviceid);
+ }
+ }
+
+ // FIXBUG: #123235 触摸过程中插拔usb键盘/鼠标导致触摸失效的问题
+ for (const auto &touchDeviceId : m_touchDevices.keys()) {
+ if (!deviceIds.contains(touchDeviceId)) {
+ m_touchDevices.remove(touchDeviceId);
+ }
}
if (m_xiMasterPointerIds.size() > 1)
@@ -593,6 +608,10 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event);
if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event))
xi2ProcessTouch(xiDeviceEvent, platformWindow);
+ else { // When the window cannot be matched, delete it from touchPoints
+ if (TouchDeviceData *dev = touchDeviceForId(xiDeviceEvent->sourceid))
+ dev->touchPoints.remove((xiDeviceEvent->detail % INT_MAX));
+ }
break;
}
} else if (xiEnterEvent && !xi2MouseEventsDisabled() && eventListener) {

View File

@ -1,21 +0,0 @@
From: hanpinlong <hanpinlong@kylinos.cn>
Date: Wed, 24 May 2023 08:29:09 +0000
Subject: !13 rebuild Merge pull request !13 from hanpinlong/openkylin/yangtze
---
src/gui/kernel/qguiapplication.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 29e2e61..d2a265b 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3057,7 +3057,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
QEvent::Type mouseEventType = QEvent::MouseMove;
Qt::MouseButton button = Qt::NoButton;
Qt::MouseButtons buttons = Qt::LeftButton;
- if (eventType == QEvent::TouchBegin && m_fakeMouseSourcePointId < 0)
+ if ((eventType == QEvent::TouchBegin && m_fakeMouseSourcePointId < 0)
|| (touchPoints.count() == 1 && m_fakeMouseSourcePointId != touchPoints.first().id()))
m_fakeMouseSourcePointId = touchPoints.first().id();
for (const auto &touchPoint : touchPoints) {

View File

@ -1,66 +0,0 @@
From: hanpinlong <hanpinlong@kylinos.cn>
Date: Thu, 25 May 2023 03:18:13 +0000
Subject: update debian/changelog.
Signed-off-by: hanpinlong <hanpinlong@kylinos.cn>
---
src/gui/kernel/qplatformwindow.cpp | 7 +++++++
src/gui/kernel/qplatformwindow.h | 1 +
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 8 ++++----
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 7207ff4..dfbd7d5 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -266,6 +266,13 @@ QPoint QPlatformWindow::mapToGlobal(const QPoint &pos) const
return result;
}
+QPointF QPlatformWindow::mapFromGlobalF(const QPointF &pos) const
+{
+ const QPoint posPt = pos.toPoint();
+ const QPointF delta = pos - posPt;
+ return mapFromGlobal(posPt) + delta;
+}
+
/*!
Translates the global screen coordinate \a pos to window
coordinates using native methods. This is required for embedded windows,
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 7b85090..a92de4e 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -114,6 +114,7 @@ public:
virtual bool isForeignWindow() const { return false; };
virtual QPoint mapToGlobal(const QPoint &pos) const;
virtual QPoint mapFromGlobal(const QPoint &pos) const;
+ QPointF mapFromGlobalF(const QPointF &pos) const;
virtual void propagateSizeHints();
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index fb2a335..cfff36d 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -1270,16 +1270,16 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD
if (Q_LIKELY(useValuators)) {
const qreal value = scaleOneValuator(normalizedValue, physicalScreenArea.x(), physicalScreenArea.width());
global.setX(value);
- // mapFromGlobal is ok for nested/embedded windows, but works only with whole-number QPoint;
- // so map it first, then add back the sub-pixel position
- local.setX(window->mapFromGlobal(QPoint(int(value), 0)).x() + (value - int(value)));
+ //! \note Fix QTBUG-77826
+ local.setX(xcbWindow->mapFromGlobalF(global).x());
}
break;
case QXcbAtom::AbsY:
if (Q_LIKELY(useValuators)) {
qreal value = scaleOneValuator(normalizedValue, physicalScreenArea.y(), physicalScreenArea.height());
global.setY(value);
- local.setY(window->mapFromGlobal(QPoint(0, int(value))).y() + (value - int(value)));
+ //! \note Fix QTBUG-77826
+ local.setY(xcbWindow->mapFromGlobalF(global).y());
}
break;
case QXcbAtom::AbsPressure:

View File

@ -1,141 +0,0 @@
From: hanpinlong <hanpinlong@kylinos.cn>
Date: Mon, 19 Jun 2023 06:57:25 +0000
Subject: update debian/changelog.
Signed-off-by: hanpinlong <hanpinlong@kylinos.cn>
---
src/corelib/global/archdetect.cpp | 4 ++++
src/corelib/global/qprocessordetection.h | 7 +++++++
src/gui/kernel/qhighdpiscaling.cpp | 13 +++----------
src/gui/kernel/qhighdpiscaling_p.h | 4 ++--
src/gui/kernel/qscreen.cpp | 6 ++++++
src/gui/painting/qtransform.cpp | 2 +-
6 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
index 1d00b7f..8ca6efe 100644
--- a/src/corelib/global/archdetect.cpp
+++ b/src/corelib/global/archdetect.cpp
@@ -59,6 +59,10 @@
# define ARCH_PROCESSOR "x86_64"
#elif defined(Q_PROCESSOR_IA64)
# define ARCH_PROCESSOR "ia64"
+#elif defined(Q_PROCESSOR_LOONGARCH_64)
+# define ARCH_PROCESSOR "loongarch64"
+#elif defined(Q_PROCESSOR_LOONGARCH)
+# define ARCH_PROCESSOR "loongarch"
#elif defined(Q_PROCESSOR_MIPS_64)
# define ARCH_PROCESSOR "mips64"
#elif defined(Q_PROCESSOR_MIPS)
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index a6ead54..2a0382c 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -228,6 +228,13 @@
# define Q_PROCESSOR_WORDSIZE 8
// Q_BYTE_ORDER not defined, use endianness auto-detection
+#elif defined(_loongarch) || defined(__loongarch__)
+# define Q_PROCESSOR_LOONGARCH
+# if defined(__loongarch64)
+# define Q_PROCESSOR_LOONGARCH_64
+# define Q_PROCESSOR_WORDSIZE 8
+# endif
+
/*
MIPS family, known revisions: I, II, III, IV, 32, 64
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index 9bbf277..dfe0ee9 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -396,10 +396,7 @@ qreal QHighDpiScaling::roundScaleFactor(qreal rawFactor)
}
// Check application object if no environment value was set.
- if (scaleFactorRoundingPolicy == Qt::HighDpiScaleFactorRoundingPolicy::Unset) {
- scaleFactorRoundingPolicy = QGuiApplication::highDpiScaleFactorRoundingPolicy();
- } else {
- // Make application setting reflect environment
+ if (scaleFactorRoundingPolicy != Qt::HighDpiScaleFactorRoundingPolicy::Unset) {
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(scaleFactorRoundingPolicy);
}
}
@@ -460,8 +457,6 @@ QDpi QHighDpiScaling::effectiveLogicalDpi(const QPlatformScreen *screen, qreal r
policyText.constData(), values.constData());
}
}
- if (dpiAdjustmentPolicy == DpiAdjustmentPolicy::Unset)
- dpiAdjustmentPolicy = DpiAdjustmentPolicy::UpOnly;
}
// Apply adjustment policy.
@@ -539,7 +534,7 @@ void QHighDpiScaling::updateHighDpiScaling()
++i;
}
}
- m_active = m_globalScalingActive || m_screenFactorSet || m_pixelDensityScalingActive;
+ m_active = m_globalScalingActive || m_usePixelDensity;
}
/*
@@ -684,9 +679,7 @@ QDpi QHighDpiScaling::logicalDpi(const QScreen *screen)
return QDpi(96, 96);
if (!m_usePixelDensity) {
- const qreal screenScaleFactor = screenSubfactor(screen->handle());
- const QDpi dpi = QPlatformScreen::overrideDpi(screen->handle()->logicalDpi());
- return QDpi{ dpi.first / screenScaleFactor, dpi.second / screenScaleFactor };
+ return screen->handle()->logicalDpi();
}
const qreal scaleFactor = rawScaleFactor(screen->handle());
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
index 5b02c5d..e4714c9 100644
--- a/src/gui/kernel/qhighdpiscaling_p.h
+++ b/src/gui/kernel/qhighdpiscaling_p.h
@@ -159,12 +159,12 @@ inline QVector2D scale(const QVector2D &value, qreal scaleFactor, QPointF /* ori
inline QPointF scale(const QPointF &pos, qreal scaleFactor, QPointF origin = QPointF(0, 0))
{
- return (pos - origin) * scaleFactor + origin;
+ return (pos - origin) * scaleFactor + origin * scaleFactor;
}
inline QPoint scale(const QPoint &pos, qreal scaleFactor, QPoint origin = QPoint(0, 0))
{
- return (pos - origin) * scaleFactor + origin;
+ return (pos - origin) * scaleFactor + origin * scaleFactor;
}
inline QRect scale(const QRect &rect, qreal scaleFactor, QPoint origin = QPoint(0, 0))
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index 8e0eb35..3bceaf2 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -410,6 +410,12 @@ QSize QScreen::availableSize() const
QRect QScreen::geometry() const
{
Q_D(const QScreen);
+
+ if (d->platformScreen)
+ {
+ return QHighDpi::fromNativePixels(d->platformScreen->geometry(), this);
+ }
+
return d->geometry;
}
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index e86aff1..9d281f6 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1568,7 +1568,7 @@ QRegion QTransform::map(const QRegion &r) const
}
QPainterPath p = map(qt_regionToPath(r));
- return p.toFillPolygon(QTransform()).toPolygon();
+ return p.toFillPolygon().toPolygon();
}
struct QHomogeneousCoordinate

View File

@ -1,45 +0,0 @@
From: liuyapeng <liuyapeng@kylinos.cn>
Date: Fri, 13 Oct 2023 15:34:08 +0800
Subject: update debian/changelog.
---
src/widgets/kernel/qtooltip.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index 0f7bc97..add2a44 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -63,6 +63,11 @@
#include <QtGui/private/qhighdpiscaling_p.h>
#include <qtooltip.h>
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
+# include <private/qcore_mac_p.h>
+#include <private/qt_cocoa_helpers_mac_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
/*!
@@ -312,7 +317,20 @@ void QTipLabel::timerEvent(QTimerEvent *e)
|| e->timerId() == expireTimer.timerId()){
hideTimer.stop();
expireTimer.stop();
+#if 0 /* Used to be included in Qt4 for Q_WS_MAC */ && QT_CONFIG(effects)
+ if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)){
+ // Fade out tip on mac (makes it invisible).
+ // The tip will not be deleted until a new tip is shown.
+
+ // DRSWAT - Cocoa
+ macWindowFade(qt_mac_window_for(this));
+ QTipLabel::instance->fadingOut = true; // will never be false again.
+ }
+ else
+ hideTipImmediately();
+#else
hideTipImmediately();
+#endif
}
}

View File

@ -1,916 +0,0 @@
From: hanpinlong <hanpinlong@kylinos.cn>
Date: Mon, 30 Oct 2023 02:00:55 +0000
Subject: update debian/changelog to 5.15.8+dfsg-ok2.2 rebuild
Signed-off-by: hanpinlong <hanpinlong@kylinos.cn>
---
src/widgets/util/qflickgesture.cpp | 634 +++++++++++++++++++++++++------------
src/widgets/util/qflickgesture_p.h | 93 +++++-
2 files changed, 520 insertions(+), 207 deletions(-)
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index 064be87..e970a85 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -47,12 +47,14 @@
#include "qgraphicssceneevent.h"
#include "qgraphicsview.h"
#endif
+#include "qstylehints.h"
#include "qscroller.h"
#include <QtGui/qtouchdevice.h>
#include "private/qapplication_p.h"
#include "private/qevent_p.h"
#include "private/qflickgesture_p.h"
#include "qdebug.h"
+#include "qtimer.h"
#ifndef QT_NO_GESTURES
@@ -68,13 +70,258 @@ QT_BEGIN_NAMESPACE
extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event);
-static QMouseEvent *copyMouseEvent(QEvent *e)
+QTimer* PressDelayHandler::m_pressDelayTimer;
+bool PressDelayHandler::m_sendingEvent = false;
+QScopedPointer<QEvent> PressDelayHandler::m_pressDelayEvent;
+QPointer<QObject> PressDelayHandler::m_pressTarget;
+
+PressDelayHandler::PressDelayHandler(QObject *parent)
+ : QObject(parent)
+{ }
+
+PressDelayHandler* PressDelayHandler::create(Qt::MouseButton button)
+{
+ switch (button) {
+ case Qt::LeftButton:
+ return new MousePressDelayHandler(QCoreApplication::instance());
+ break;
+ case Qt::NoButton:
+ return new TouchPressDelayHandler(QCoreApplication::instance());
+ default:
+ break;
+ }
+ return new MousePressDelayHandler(QCoreApplication::instance());
+}
+
+bool PressDelayHandler::shouldEventBeIgnored() const
+{
+ return m_sendingEvent;
+}
+
+bool PressDelayHandler::isDelaying() const
+{
+ return hasSavedDelayEvent();
+}
+
+void PressDelayHandler::pressed(QEvent *e, int delay)
+{
+ if (!hasSavedDelayEvent()) {
+ qFGDebug("QFG: consuming/delaying press");
+ m_pressDelayEvent.reset(copyEvent(e));
+ saveDelayEventInfo(e);
+ startTimer(delay);
+ } else {
+ qFGDebug("QFG: NOT consuming/delaying press");
+ }
+
+}
+
+bool PressDelayHandler::released(QEvent *e, bool scrollerWasActive, bool scrollerIsActive)
+{
+ // stop the timer
+ stopTimer();
+
+ bool result = scrollerWasActive || scrollerIsActive;
+
+ // we still haven't even sent the press, so do it now
+ if (hasSavedDelayEvent() && pressTarget() && !scrollerIsActive) {
+
+ qFGDebug() << "QFG: re-sending press (due to release) for " << pressTarget();
+ sendSpontaneousEvent(m_pressDelayEvent.data(), pressTarget(), UngrabMouseBefore);
+
+ qFGDebug() << "QFG: faking release (due to release) for " << pressTarget();
+ sendSpontaneousEvent(e, pressTarget(), 0);
+
+ result = true; // consume this event
+ } else if (pressTarget() && scrollerIsActive) {
+ // we grabbed the mouse expicitly when the scroller became active, so undo that now
+ qFGDebug() << "QFG: ungrab mouse which grabbed when the scroller became active";
+ sendSpontaneousEvent(nullptr, pressTarget(), UngrabMouseBefore);
+ }
+
+ resetDelayEvent();
+ resetPressTarget();
+ return result;
+}
+
+void PressDelayHandler::scrollerWasIntercepted()
+{
+ qFGDebug("QFG: deleting delayed press, since scroller was only intercepted");
+ if (hasSavedDelayEvent()) {
+ // we still haven't even sent the press, so just throw it away now
+ stopTimer();
+ }
+ resetPressTarget();
+}
+
+void PressDelayHandler::scrollerBecameActive()
+{
+ if (hasSavedDelayEvent()) {
+ // we still haven't even sent the press, so just throw it away now
+ qFGDebug("QFG: deleting delayed mouse press, since scroller is active now");
+ stopTimer();
+ resetDelayEvent();
+ resetPressTarget();
+ } else if (pressTarget()) {
+ // we did send a press, so we need to fake a release now
+ releaseAllPressed();
+ // don't clear the pressTarget just yet, since we need to explicitly ungrab the mouse on release!
+ }
+}
+
+void PressDelayHandler::onDelayTimeout()
+{
+ if (hasSavedDelayEvent() && pressTarget()) {
+ qFGDebug() << "QFG: timer event: re-sending press to " << pressTarget();
+ sendSpontaneousEvent(m_pressDelayEvent.data(), pressTarget(), UngrabMouseBefore);
+ }
+ resetDelayEvent();
+
+ stopTimer();
+}
+
+void PressDelayHandler::stopTimer()
+{
+ if (!m_pressDelayTimer)
+ return;
+ if (!m_pressDelayTimer->isActive())
+ return;
+ m_pressDelayTimer->stop();
+}
+
+void PressDelayHandler::startTimer(int timeout)
+{
+ if (!m_pressDelayTimer)
+ m_pressDelayTimer = new QTimer;
+ if (m_pressDelayTimer->isActive()) {
+ qFGDebug() << "QFG: timer is active, don't start again";
+ return;
+ }
+ m_pressDelayTimer->singleShot(timeout, this, &PressDelayHandler::onDelayTimeout);
+}
+
+void PressDelayHandler::sendSpontaneousEvent(QEvent *e, QObject *target, int flags)
+{
+#if QT_CONFIG(graphicsview)
+ if (flags & UngrabMouseBefore)
+ ungrabMouse(mouseGrabberItem());
+#else
+ Q_UNUSED(flags);
+#endif
+
+ m_sendingEvent = true;
+ sendEvent(e, target);
+ m_sendingEvent = false;
+
+#if QT_CONFIG(graphicsview)
+ if (flags & RegrabMouseAfterwards)
+ grabMouse(mouseGrabberItem());
+#endif
+}
+
+QPointer<QObject> PressDelayHandler::pressTarget() const
+{
+ return m_pressTarget;
+}
+
+void PressDelayHandler::setPressTarget(QObject* pressTarget)
+{
+ m_pressTarget = pressTarget;
+}
+
+void PressDelayHandler::resetPressTarget()
+{
+ m_pressTarget = nullptr;
+}
+
+bool PressDelayHandler::hasSavedDelayEvent() const
+{
+ return !m_pressDelayEvent.isNull();
+}
+
+void PressDelayHandler::resetDelayEvent()
+{
+ m_pressDelayEvent.reset(nullptr);
+}
+
+QGraphicsItem* PressDelayHandler::mouseGrabberItem() const
+{
+ QGraphicsItem *grabber = nullptr;
+
+ QWidget* targetWidget = nullptr;
+ if (pressTarget().data()->isWidgetType()) {
+ targetWidget = dynamic_cast<QWidget*>(pressTarget().data());
+ }
+ else {
+ targetWidget = QApplication::widgetAt(QCursor::pos());
+ }
+ if (!targetWidget)
+ return nullptr;
+
+ if (targetWidget->parentWidget()) {
+ if (QGraphicsView *gv = qobject_cast<QGraphicsView *>(targetWidget->parentWidget())) {
+ if (gv->scene())
+ grabber = gv->scene()->mouseGrabberItem();
+ }
+ }
+ return grabber;
+}
+
+void PressDelayHandler::grabMouse(QGraphicsItem* grabber) const
+{
+ if (!grabber)
+ return;
+
+ // GraphicsView Mouse Handling Workaround #2:
+ // we need to re-grab the mouse after sending a faked mouse
+ // release, since we still need the mouse moves for the gesture
+ // (the scene will clear the item's mouse grabber status on
+ // release).
+ qFGDebug() << "QFG: re-grabbing" << grabber;
+ grabber->grabMouse();
+}
+
+void PressDelayHandler::ungrabMouse(QGraphicsItem* grabber) const
+{
+ if (!grabber)
+ return;
+
+ // GraphicsView Mouse Handling Workaround #1:
+ // we need to ungrab the mouse before re-sending the press,
+ // since the scene had already set the mouse grabber to the
+ // original (and consumed) event's receiver
+ qFGDebug() << "QFG: ungrabbing" << grabber;
+ grabber->ungrabMouse();
+}
+
+MousePressDelayHandler::MousePressDelayHandler(QObject *parent)
+ : PressDelayHandler(parent)
+ , m_mouseButton(Qt::NoButton)
+ , m_mouseEventSource(Qt::MouseEventNotSynthesized)
+{
+ qFGDebug("QFG: create MousePressDelayHandler");
+}
+
+void MousePressDelayHandler::saveDelayEventInfo(QEvent* e)
+{
+ QMouseEvent* me = dynamic_cast<QMouseEvent*>(e);
+ if (!me) {
+ qWarning() << "MousePressDelayHandler handling event not QMouseEvent";
+ return;
+ }
+
+ setPressTarget(QApplication::widgetAt(me->globalPos()));
+ m_mouseButton = me->button();
+ m_mouseEventSource = me->source();
+}
+
+QEvent* MousePressDelayHandler::copyEvent(QEvent *e)
{
switch (e->type()) {
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease:
case QEvent::MouseMove: {
- QMouseEvent *me = static_cast<QMouseEvent *>(e);
+ QMouseEvent *me = dynamic_cast<QMouseEvent *>(e);
QMouseEvent *cme = new QMouseEvent(me->type(), QPoint(0, 0), me->windowPos(), me->screenPos(),
me->button(), me->buttons(), me->modifiers(), me->source());
return cme;
@@ -83,10 +330,10 @@ static QMouseEvent *copyMouseEvent(QEvent *e)
case QEvent::GraphicsSceneMousePress:
case QEvent::GraphicsSceneMouseRelease:
case QEvent::GraphicsSceneMouseMove: {
- QGraphicsSceneMouseEvent *me = static_cast<QGraphicsSceneMouseEvent *>(e);
+ QGraphicsSceneMouseEvent *me = dynamic_cast<QGraphicsSceneMouseEvent *>(e);
#if 1
QEvent::Type met = me->type() == QEvent::GraphicsSceneMousePress ? QEvent::MouseButtonPress :
- (me->type() == QEvent::GraphicsSceneMouseRelease ? QEvent::MouseButtonRelease : QEvent::MouseMove);
+ (me->type() == QEvent::GraphicsSceneMouseRelease ? QEvent::MouseButtonRelease : QEvent::MouseMove);
QMouseEvent *cme = new QMouseEvent(met, QPoint(0, 0), QPoint(0, 0), me->screenPos(),
me->button(), me->buttons(), me->modifiers(), me->source());
return cme;
@@ -118,216 +365,193 @@ static QMouseEvent *copyMouseEvent(QEvent *e)
}
}
-class PressDelayHandler : public QObject
+void MousePressDelayHandler::sendEvent(QEvent *e, QObject* target)
{
-private:
- PressDelayHandler(QObject *parent = nullptr)
- : QObject(parent)
- , pressDelayTimer(0)
- , sendingEvent(false)
- , mouseButton(Qt::NoButton)
- , mouseTarget(nullptr)
- , mouseEventSource(Qt::MouseEventNotSynthesized)
- { }
+ QMouseEvent* me = dynamic_cast<QMouseEvent*>(e);
+ QWidget* targetWidget = dynamic_cast<QWidget*>(target);
-public:
- enum {
- UngrabMouseBefore = 1,
- RegrabMouseAfterwards = 2
- };
-
- static PressDelayHandler *instance()
- {
- static PressDelayHandler *inst = nullptr;
- if (!inst)
- inst = new PressDelayHandler(QCoreApplication::instance());
- return inst;
+ if (!targetWidget) {
+ return;
}
- bool shouldEventBeIgnored(QEvent *) const
- {
- return sendingEvent;
+ if (me) {
+ QMouseEvent copy(me->type(), targetWidget->mapFromGlobal(me->globalPos()),
+ targetWidget->topLevelWidget()->mapFromGlobal(me->globalPos()), me->screenPos(),
+ me->button(), me->buttons(), me->modifiers(), me->source());
+ qt_sendSpontaneousEvent(targetWidget, &copy);
}
+}
- bool isDelaying() const
- {
- return !pressDelayEvent.isNull();
- }
+void MousePressDelayHandler::releaseAllPressed()
+{
+ QPoint farFarAway(-QWIDGETSIZE_MAX, -QWIDGETSIZE_MAX);
- void pressed(QEvent *e, int delay)
- {
- if (!pressDelayEvent) {
- pressDelayEvent.reset(copyMouseEvent(e));
- pressDelayTimer = startTimer(delay);
- mouseTarget = QApplication::widgetAt(pressDelayEvent->globalPos());
- mouseButton = pressDelayEvent->button();
- mouseEventSource = pressDelayEvent->source();
- qFGDebug("QFG: consuming/delaying mouse press");
- } else {
- qFGDebug("QFG: NOT consuming/delaying mouse press");
- }
- e->setAccepted(true);
- }
+ qFGDebug() << "QFG: sending a fake mouse release at far-far-away to " << pressTarget();
+ QMouseEvent re(QEvent::MouseButtonRelease, QPoint(), farFarAway, farFarAway,
+ m_mouseButton, QApplication::mouseButtons() & ~m_mouseButton,
+ QApplication::keyboardModifiers(), m_mouseEventSource);
+ sendSpontaneousEvent(&re, pressTarget(), RegrabMouseAfterwards);
+}
- bool released(QEvent *e, bool scrollerWasActive, bool scrollerIsActive)
- {
- // consume this event if the scroller was or is active
- bool result = scrollerWasActive || scrollerIsActive;
+TouchPressDelayHandler::TouchPressDelayHandler(QObject *parent)
+ : PressDelayHandler(parent)
+{
+ qFGDebug("QFG: create TouchPressDelayHandler");
+}
- // stop the timer
- if (pressDelayTimer) {
- killTimer(pressDelayTimer);
- pressDelayTimer = 0;
- }
- // we still haven't even sent the press, so do it now
- if (pressDelayEvent && mouseTarget && !scrollerIsActive) {
- QScopedPointer<QMouseEvent> releaseEvent(copyMouseEvent(e));
+void TouchPressDelayHandler::saveDelayEventInfo(QEvent* e)
+{
+ QTouchEvent* te = dynamic_cast<QTouchEvent*>(e);
+ if (!te) {
+ qWarning() << "TouchPressDelayHandler handling event not QTouchEvent";
+ }
+ setPressTarget(te->window());
+ m_touchBeginPoint = te->touchPoints().at(0);
+ m_device = te->device();
+}
- qFGDebug() << "QFG: re-sending mouse press (due to release) for " << mouseTarget;
- sendMouseEvent(pressDelayEvent.data(), UngrabMouseBefore);
+void TouchPressDelayHandler::releaseAllPressed()
+{
+ qFGDebug() << "QFG: sending a fake touch cancel to " << pressTarget();
+ QTouchEvent te(QEvent::TouchCancel, m_device, QApplication::keyboardModifiers(),
+ Qt::TouchPointReleased, QList<QTouchEvent::TouchPoint>{m_touchBeginPoint});
+ te.setWindow(dynamic_cast<QWindow*>(pressTarget().data()));
+ sendSpontaneousEvent(&te, pressTarget(), 0);
+}
- qFGDebug() << "QFG: faking mouse release (due to release) for " << mouseTarget;
- sendMouseEvent(releaseEvent.data());
+void TouchPressDelayHandler::sendEvent(QEvent *e, QObject* target)
+{
+ QTouchEvent* te = dynamic_cast<QTouchEvent*>(e);
+ QWindow* targetWindow = dynamic_cast<QWindow*>(target);
- result = true; // consume this event
- } else if (mouseTarget && scrollerIsActive) {
- // we grabbed the mouse expicitly when the scroller became active, so undo that now
- sendMouseEvent(nullptr, UngrabMouseBefore);
- }
- pressDelayEvent.reset(nullptr);
- mouseTarget = nullptr;
- return result;
- }
-
- void scrollerWasIntercepted()
- {
- qFGDebug("QFG: deleting delayed mouse press, since scroller was only intercepted");
- if (pressDelayEvent) {
- // we still haven't even sent the press, so just throw it away now
- if (pressDelayTimer) {
- killTimer(pressDelayTimer);
- pressDelayTimer = 0;
- }
- pressDelayEvent.reset(nullptr);
- }
- mouseTarget = nullptr;
+ if (!targetWindow) {
+ return;
+ }
+ if (!te) {
+ return;
}
- void scrollerBecameActive()
- {
- if (pressDelayEvent) {
- // we still haven't even sent the press, so just throw it away now
- qFGDebug("QFG: deleting delayed mouse press, since scroller is active now");
- if (pressDelayTimer) {
- killTimer(pressDelayTimer);
- pressDelayTimer = 0;
- }
- pressDelayEvent.reset(nullptr);
- mouseTarget = nullptr;
- } else if (mouseTarget) {
- // we did send a press, so we need to fake a release now
-
- // release all pressed mouse buttons
- /* Qt::MouseButtons mouseButtons = QGuiApplication::mouseButtons();
- for (int i = 0; i < 32; ++i) {
- if (mouseButtons & (1 << i)) {
- Qt::MouseButton b = static_cast<Qt::MouseButton>(1 << i);
- mouseButtons &= ~b;
- QPoint farFarAway(-QWIDGETSIZE_MAX, -QWIDGETSIZE_MAX);
-
- qFGDebug() << "QFG: sending a fake mouse release at far-far-away to " << mouseTarget;
- QMouseEvent re(QEvent::MouseButtonRelease, QPoint(), farFarAway,
- b, mouseButtons, QGuiApplication::keyboardModifiers());
- sendMouseEvent(&re);
- }
- }*/
+ // map to window pos for send to window
+ QTouchEvent::TouchPoint touchPoint = (!te->touchPoints().empty()) ? te->touchPoints().at(0) : QTouchEvent::TouchPoint();
+ const QPointF screenPos = touchPoint.screenPos();
+ const QPointF delta = screenPos - screenPos.toPoint();
+ const QPointF windowPos = targetWindow->mapFromGlobal(screenPos.toPoint()) + delta;
+ const QPointF startPos = targetWindow->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;
+ const QPointF lastPos = targetWindow->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;
+
+ touchPoint.setPos(windowPos);
+ touchPoint.setStartPos(startPos);
+ touchPoint.setLastPos(lastPos);
+
+ qFGDebug() << "QFG: sending" << te->type() << "event to" << targetWindow;
+ // send touch event to window because there is a grab mechanism for touch events
+ QTouchEvent copy(te->type(), te->device(), te->modifiers(),
+ te->touchPointStates(), QList<QTouchEvent::TouchPoint>{touchPoint});
+ copy.setWindow(targetWindow);
+ qt_sendSpontaneousEvent(targetWindow, &copy);
+
+ // when Qt::AA_SynthesizeMouseForUnhandledTouchEvents is set,
+ // Qt will send a fake mouse eventif touch event not accept.
+ // The touch event we send here will not send the fake mouse event,
+ // so send it here.
+ if ((qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents) && !copy.isAccepted())
+ || copy.type() == QEvent::TouchCancel) {
+ sendMouseEventFromTouch(&copy, targetWindow);
+ }
+}
- QPoint farFarAway(-QWIDGETSIZE_MAX, -QWIDGETSIZE_MAX);
+void TouchPressDelayHandler::sendMouseEventFromTouch(QTouchEvent *te, QWindow *target)
+{
+ if (te->type() == QEvent::TouchCancel) {
+ QPoint farFarAway(-QWIDGETSIZE_MAX, -QWIDGETSIZE_MAX);
+
+ qFGDebug() << "QFG: sending a fake mouse release at far-far-away to " << pressTarget();
+ QMouseEvent fake(QEvent::MouseButtonRelease, QPoint(), farFarAway, farFarAway,
+ Qt::LeftButton, QApplication::mouseButtons() & ~Qt::LeftButton,
+ QApplication::keyboardModifiers(), Qt::MouseEventSynthesizedByQt);
+ qt_sendSpontaneousEvent(target, &fake);
+ return;
+ }
- qFGDebug() << "QFG: sending a fake mouse release at far-far-away to " << mouseTarget;
- QMouseEvent re(QEvent::MouseButtonRelease, QPoint(), farFarAway, farFarAway,
- mouseButton, QGuiApplication::mouseButtons() & ~mouseButton,
- QGuiApplication::keyboardModifiers(), mouseEventSource);
- sendMouseEvent(&re, RegrabMouseAfterwards);
- // don't clear the mouseTarget just yet, since we need to explicitly ungrab the mouse on release!
+ QTouchEvent::TouchPoint touchPoint = te->touchPoints().at(0);
+ const QPointF screenPos = touchPoint.screenPos();
+ const QPointF delta = screenPos - screenPos.toPoint();
+ const QPointF pos = target->mapFromGlobal(screenPos.toPoint()) + delta;
+
+ QEvent::Type mouseEventType = QEvent::MouseMove;
+ Qt::MouseButton button = Qt::NoButton;
+ Qt::MouseButtons buttons = Qt::LeftButton;
+
+ switch (touchPoint.state()) {
+ case Qt::TouchPointPressed:
+ if (isDoubleClick()) {
+ mouseEventType = QEvent::MouseButtonDblClick;
+ button = Qt::NoButton;
+ m_mousePressTime = QTime();
}
+ else {
+ mouseEventType = QEvent::MouseButtonPress;
+ button = Qt::LeftButton;
+ m_mousePressTime = QTime::currentTime();
+ }
+ break;
+ case Qt::TouchPointReleased:
+ mouseEventType = QEvent::MouseButtonRelease;
+ button = Qt::LeftButton;
+ buttons = Qt::NoButton;
+ break;
+ default:
+ break;
}
-protected:
- void timerEvent(QTimerEvent *e) override
- {
- if (e->timerId() == pressDelayTimer) {
- if (pressDelayEvent && mouseTarget) {
- qFGDebug() << "QFG: timer event: re-sending mouse press to " << mouseTarget;
- sendMouseEvent(pressDelayEvent.data(), UngrabMouseBefore);
- }
- pressDelayEvent.reset(nullptr);
-
- if (pressDelayTimer) {
- killTimer(pressDelayTimer);
- pressDelayTimer = 0;
- }
- }
+ if (mouseEventType == QEvent::MouseButtonPress) {
+ qFGDebug() << "QFG: send fake move event to" << target;
+ QMouseEvent fake(QEvent::MouseMove, pos, pos, screenPos,
+ Qt::NoButton, Qt::NoButton,
+ QApplication::keyboardModifiers(), Qt::MouseEventSynthesizedByQt);
+ qt_sendSpontaneousEvent(target, &fake);
}
- void sendMouseEvent(QMouseEvent *me, int flags = 0)
- {
- if (mouseTarget) {
- sendingEvent = true;
+ // will not synthesize QEvent::NonClientAreaMouseButtonDblClick from touch
+ qFGDebug() << "QFG: send fake " << mouseEventType << "to" << target;
+ QMouseEvent fake(mouseEventType, pos, pos, screenPos,
+ button, buttons, QApplication::keyboardModifiers(), Qt::MouseEventSynthesizedByQt);
+ qt_sendSpontaneousEvent(target, &fake);
+}
-#if QT_CONFIG(graphicsview)
- QGraphicsItem *grabber = nullptr;
- if (mouseTarget->parentWidget()) {
- if (QGraphicsView *gv = qobject_cast<QGraphicsView *>(mouseTarget->parentWidget())) {
- if (gv->scene())
- grabber = gv->scene()->mouseGrabberItem();
- }
- }
+bool TouchPressDelayHandler::isDoubleClick() const
+{
+ // if not save time, return false then save current time
+ if (m_mousePressTime.isNull())
+ return false;
- if (grabber && (flags & UngrabMouseBefore)) {
- // GraphicsView Mouse Handling Workaround #1:
- // we need to ungrab the mouse before re-sending the press,
- // since the scene had already set the mouse grabber to the
- // original (and consumed) event's receiver
- qFGDebug() << "QFG: ungrabbing" << grabber;
- grabber->ungrabMouse();
- }
-#else
- Q_UNUSED(flags);
-#endif // QT_CONFIG(graphicsview)
+ int doubleClickInterval = static_cast<int>(QGuiApplication::styleHints()->mouseDoubleClickInterval());
+ int elapsed = m_mousePressTime.msecsTo(QTime::currentTime());
+ bool doubleClick = elapsed < doubleClickInterval;
- if (me) {
- QMouseEvent copy(me->type(), mouseTarget->mapFromGlobal(me->globalPos()),
- mouseTarget->topLevelWidget()->mapFromGlobal(me->globalPos()), me->screenPos(),
- me->button(), me->buttons(), me->modifiers(), me->source());
- qt_sendSpontaneousEvent(mouseTarget, &copy);
- }
+ return doubleClick;
+}
-#if QT_CONFIG(graphicsview)
- if (grabber && (flags & RegrabMouseAfterwards)) {
- // GraphicsView Mouse Handling Workaround #2:
- // we need to re-grab the mouse after sending a faked mouse
- // release, since we still need the mouse moves for the gesture
- // (the scene will clear the item's mouse grabber status on
- // release).
- qFGDebug() << "QFG: re-grabbing" << grabber;
- grabber->grabMouse();
- }
-#endif
- sendingEvent = false;
- }
+QEvent* TouchPressDelayHandler::copyEvent(QEvent *e)
+{
+ switch (e->type()) {
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
+ case QEvent::TouchCancel: {
+ QTouchEvent* te = dynamic_cast<QTouchEvent*>(e);
+ QTouchEvent* copy = new QTouchEvent(te->type(), te->device(), te->modifiers(),
+ te->touchPointStates(), te->touchPoints());
+ copy->setWindow(te->window());
+ return copy;
+ break;
+ }
+ default:
+ break;
}
-
-private:
- int pressDelayTimer;
- QScopedPointer<QMouseEvent> pressDelayEvent;
- bool sendingEvent;
- Qt::MouseButton mouseButton;
- QPointer<QWidget> mouseTarget;
- Qt::MouseEventSource mouseEventSource;
-};
-
+ return nullptr;
+}
/*!
\internal
@@ -350,15 +574,16 @@ QFlickGesture::QFlickGesture(QObject *receiver, Qt::MouseButton button, QObject
{
d_func()->q_ptr = this;
d_func()->receiver = receiver;
- d_func()->receiverScroller = (receiver && QScroller::hasScroller(receiver)) ? QScroller::scroller(receiver) : nullptr;
+ d_func()->receiverScroller = (receiver && QScroller::hasScroller(receiver)) ? QScroller::scroller(receiver) : 0;
d_func()->button = button;
+ d_func()->pressDelayHandler = PressDelayHandler::create(button);
}
QFlickGesture::~QFlickGesture()
{ }
QFlickGesturePrivate::QFlickGesturePrivate()
- : receiverScroller(nullptr), button(Qt::NoButton), macIgnoreWheel(false)
+ : receiverScroller(0), button(Qt::NoButton), macIgnoreWheel(false), pressDelayHandler(nullptr)
{ }
@@ -415,16 +640,16 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
#endif
// this is only set for events that we inject into the event loop via sendEvent()
- if (PressDelayHandler::instance()->shouldEventBeIgnored(event)) {
+ if (d->pressDelayHandler->shouldEventBeIgnored()) {
//qFGDebug() << state << "QFG: ignored event: " << event->type();
return Ignore;
}
- const QMouseEvent *me = nullptr;
+ const QMouseEvent *me = 0;
#if QT_CONFIG(graphicsview)
- const QGraphicsSceneMouseEvent *gsme = nullptr;
+ const QGraphicsSceneMouseEvent *gsme = 0;
#endif
- const QTouchEvent *te = nullptr;
+ const QTouchEvent *te = 0;
QPoint globalPos;
// qFGDebug() << "FlickGesture "<<state<<"watched:"<<watched<<"receiver"<<d->receiver<<"event"<<event->type()<<"button"<<button;
@@ -620,7 +845,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
#if QT_CONFIG(graphicsview)
|| gsme
#endif
- ) && scrollerIsActive)
+ || te) && scrollerIsActive)
result |= ConsumeEventHint;
// The only problem with this approach is that we consume the
@@ -632,11 +857,11 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
#if QT_CONFIG(graphicsview)
|| gsme
#endif
- ) {
+ || te) {
if (!scrollerWasDragging && !scrollerWasScrolling && scrollerIsActive)
- PressDelayHandler::instance()->scrollerBecameActive();
+ d->pressDelayHandler->scrollerBecameActive();
else if (scrollerWasScrolling && (scroller->state() == QScroller::Dragging || scroller->state() == QScroller::Inactive))
- PressDelayHandler::instance()->scrollerWasIntercepted();
+ d->pressDelayHandler->scrollerWasIntercepted();
}
if (!inputType) {
@@ -644,6 +869,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
} else {
switch (event->type()) {
case QEvent::MouseButtonPress:
+ case QEvent::TouchBegin:
#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMousePress:
#endif
@@ -652,24 +878,21 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
if (pressDelay > 0) {
result |= ConsumeEventHint;
- PressDelayHandler::instance()->pressed(event, pressDelay);
+ d->pressDelayHandler->pressed(event, pressDelay);
event->accept();
}
}
- Q_FALLTHROUGH();
- case QEvent::TouchBegin:
q->setHotSpot(globalPos);
result |= scrollerIsActive ? TriggerGesture : MayBeGesture;
break;
case QEvent::MouseMove:
+ case QEvent::TouchUpdate:
#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMouseMove:
#endif
- if (PressDelayHandler::instance()->isDelaying())
+ if (d->pressDelayHandler->isDelaying())
result |= ConsumeEventHint;
- Q_FALLTHROUGH();
- case QEvent::TouchUpdate:
result |= scrollerIsActive ? TriggerGesture : Ignore;
break;
@@ -677,10 +900,9 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
case QEvent::GraphicsSceneMouseRelease:
#endif
case QEvent::MouseButtonRelease:
- if (PressDelayHandler::instance()->released(event, scrollerWasDragging || scrollerWasScrolling, scrollerIsActive))
- result |= ConsumeEventHint;
- Q_FALLTHROUGH();
case QEvent::TouchEnd:
+ if (d->pressDelayHandler->released(event, scrollerWasDragging || scrollerWasScrolling, scrollerIsActive))
+ result |= ConsumeEventHint;
result |= scrollerIsActive ? FinishGesture : CancelGesture;
break;
diff --git a/src/widgets/util/qflickgesture_p.h b/src/widgets/util/qflickgesture_p.h
index 0b47516..a41633d 100644
--- a/src/widgets/util/qflickgesture_p.h
+++ b/src/widgets/util/qflickgesture_p.h
@@ -71,12 +71,65 @@ class Q_WIDGETS_EXPORT QFlickGesture : public QGesture
Q_DECLARE_PRIVATE(QFlickGesture)
public:
- QFlickGesture(QObject *receiver, Qt::MouseButton button, QObject *parent = nullptr);
+ QFlickGesture(QObject *receiver, Qt::MouseButton button, QObject *parent = 0);
~QFlickGesture();
friend class QFlickGestureRecognizer;
};
+class PressDelayHandler : public QObject
+{
+ Q_OBJECT
+public:
+ PressDelayHandler(QObject *parent = nullptr);
+ enum {
+ UngrabMouseBefore = 1,
+ RegrabMouseAfterwards = 2
+ };
+
+ static PressDelayHandler* create(Qt::MouseButton button = Qt::LeftButton);
+
+ bool shouldEventBeIgnored() const;
+ bool isDelaying() const;
+
+ void pressed(QEvent *e, int delay);
+ bool released(QEvent *e, bool scrollerWasActive, bool scrollerIsActive);
+
+ void scrollerWasIntercepted();
+ void scrollerBecameActive();
+
+protected:
+ void sendSpontaneousEvent(QEvent *e, QObject *target, int flags);
+ QPointer<QObject> pressTarget() const;
+ void setPressTarget(QObject* pressTarget);
+ void resetPressTarget();
+
+private slots:
+ void onDelayTimeout();
+private:
+ virtual void saveDelayEventInfo(QEvent* e) = 0;
+ virtual QEvent* copyEvent(QEvent* e) = 0;
+
+ virtual void sendEvent(QEvent *e, QObject* target) = 0;
+ virtual void releaseAllPressed() = 0;
+
+ QGraphicsItem* mouseGrabberItem() const;
+ void grabMouse(QGraphicsItem* grabber) const;
+ void ungrabMouse(QGraphicsItem* grabber) const;
+
+ bool hasSavedDelayEvent() const;
+ void resetDelayEvent();
+ void stopTimer();
+ void startTimer(int timeout);
+
+private:
+ // there will only be one QScroller active at same time
+ static QTimer* m_pressDelayTimer;
+ static bool m_sendingEvent;
+ static QScopedPointer<QEvent> m_pressDelayEvent;
+ static QPointer<QObject> m_pressTarget;
+};
+
class QFlickGesturePrivate : public QGesturePrivate
{
Q_DECLARE_PUBLIC(QFlickGesture)
@@ -87,6 +140,7 @@ public:
QScroller *receiverScroller;
Qt::MouseButton button; // NoButton == Touch
bool macIgnoreWheel;
+ PressDelayHandler *pressDelayHandler;
};
class QFlickGestureRecognizer : public QGestureRecognizer
@@ -102,6 +156,43 @@ private:
Qt::MouseButton button; // NoButton == Touch
};
+class MousePressDelayHandler : public PressDelayHandler
+{
+public:
+ MousePressDelayHandler(QObject *parent = nullptr);
+
+private:
+ void saveDelayEventInfo(QEvent* e) override;
+
+ QEvent* copyEvent(QEvent *e) override;
+ void sendEvent(QEvent *e, QObject* target) override;
+ void releaseAllPressed() override;
+
+ Qt::MouseButton m_mouseButton;
+ Qt::MouseEventSource m_mouseEventSource;
+};
+
+class TouchPressDelayHandler : public PressDelayHandler
+{
+public:
+ TouchPressDelayHandler(QObject *parent = nullptr);
+
+private:
+ void saveDelayEventInfo(QEvent* e) override;
+
+ QEvent* copyEvent(QEvent *e) override;
+ void sendEvent(QEvent *e, QObject* target) override;
+ void releaseAllPressed() override;
+
+ void sendMouseEventFromTouch(QTouchEvent *te, QWindow *target);
+ bool isDoubleClick() const;
+
+ QPointer<QWidget> m_targetWidget;
+ QTouchDevice* m_device;
+ QTouchEvent::TouchPoint m_touchBeginPoint;
+ QTime m_mousePressTime;
+};
+
QT_END_NAMESPACE
#endif // QT_NO_GESTURES

View File

@ -1,37 +0,0 @@
From: liuyapeng <liuyapeng@kylinos.cn>
Date: Wed, 8 Nov 2023 17:40:32 +0800
Subject: =?utf-8?b?YnVnZml4OiNJNzlGRDDjgJDmlofku7bnrqHnkIblmajjgJHjgJB3YXls?=
=?utf-8?b?YW5k44CR5L6n6L655qCP5oKs5YGc5pi+56S65L2N572u5LiN5q2j56Gu?=
---
src/widgets/kernel/qtooltip.cpp | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index add2a44..84054d4 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -508,14 +508,15 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
else if (!QTipLabel::instance->fadingOut){
// If the tip has changed, reuse the one
// that is showing (removes flickering)
- QPoint localPos = pos;
- if (w)
- localPos = w->mapFromGlobal(pos);
- if (QTipLabel::instance->tipChanged(localPos, text, w)){
- QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
- QTipLabel::instance->setTipRect(w, rect);
- QTipLabel::instance->placeTip(pos, w);
- }
+ // QPoint localPos = pos;
+ // if (w)
+ // localPos = w->mapFromGlobal(pos);
+ // if (QTipLabel::instance->tipChanged(localPos, text, w)){
+ // QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
+ // QTipLabel::instance->setTipRect(w, rect);
+ // QTipLabel::instance->placeTip(pos, w);
+ // }
+ QTipLabel::instance->hideTip();
return;
}
}

View File

@ -1,104 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: QProcess: ensure we don't accidentally execute something from CWD
Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2022-25255-qprocess5-15.diff
Last-Update: 2022-02-21
Unless "." (or the empty string) is in $PATH, we're not supposed to find
executables in the current directory. This is how the Unix shells behave
and we match their behavior. It's also the behavior Qt had prior to 5.9
(commit 28666d167aa8e602c0bea25ebc4d51b55005db13). On Windows, searching
the current directory is the norm, so we keep that behavior.
This commit does not add an explicit check for an empty return from
QStandardPaths::findExecutable(). Instead, we allow that empty string to
go all the way to execve(2), which will fail with ENOENT. We could catch
it early, before fork(2), but why add code for the error case?
See https://kde.org/info/security/advisory-20220131-1.txt
---
src/corelib/io/qprocess_unix.cpp | 28 ++++++++++++----------
.../kernel/qapplication/tst_qapplication.cpp | 4 ++--
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 50390e5..15c8f30 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2022 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -422,14 +422,15 @@ void QProcessPrivate::startProcess()
// Add the program name to the argument list.
argv[0] = nullptr;
if (!program.contains(QLatin1Char('/'))) {
+ // findExecutable() returns its argument if it's an absolute path,
+ // otherwise it searches $PATH; returns empty if not found (we handle
+ // that case much later)
const QString &exeFilePath = QStandardPaths::findExecutable(program);
- if (!exeFilePath.isEmpty()) {
- const QByteArray &tmp = QFile::encodeName(exeFilePath);
- argv[0] = ::strdup(tmp.constData());
- }
- }
- if (!argv[0])
+ const QByteArray &tmp = QFile::encodeName(exeFilePath);
+ argv[0] = ::strdup(tmp.constData());
+ } else {
argv[0] = ::strdup(encodedProgramName.constData());
+ }
// Add every argument to the list
for (int i = 0; i < arguments.count(); ++i)
@@ -983,15 +984,16 @@ bool QProcessPrivate::startDetached(qint64 *pid)
envp = _q_dupEnvironment(environment.d.constData()->vars, &envc);
}
- QByteArray tmp;
if (!program.contains(QLatin1Char('/'))) {
+ // findExecutable() returns its argument if it's an absolute path,
+ // otherwise it searches $PATH; returns empty if not found (we handle
+ // that case much later)
const QString &exeFilePath = QStandardPaths::findExecutable(program);
- if (!exeFilePath.isEmpty())
- tmp = QFile::encodeName(exeFilePath);
+ const QByteArray &tmp = QFile::encodeName(exeFilePath);
+ argv[0] = ::strdup(tmp.constData());
+ } else {
+ argv[0] = ::strdup(QFile::encodeName(program));
}
- if (tmp.isEmpty())
- tmp = QFile::encodeName(program);
- argv[0] = tmp.data();
if (envp)
qt_safe_execve(argv[0], argv, envp);
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index a3b8ef7..4955ceb 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1498,7 +1498,7 @@ void tst_QApplication::desktopSettingsAware()
environment += QLatin1String("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM=1");
testProcess.setEnvironment(environment);
#endif
- testProcess.start("desktopsettingsaware_helper");
+ testProcess.start("./desktopsettingsaware_helper");
QVERIFY2(testProcess.waitForStarted(),
qPrintable(QString::fromLatin1("Cannot start 'desktopsettingsaware_helper': %1").arg(testProcess.errorString())));
QVERIFY(testProcess.waitForFinished(10000));
@@ -2452,7 +2452,7 @@ void tst_QApplication::qtbug_12673()
#if QT_CONFIG(process)
QProcess testProcess;
QStringList arguments;
- testProcess.start("modal_helper", arguments);
+ testProcess.start("./modal_helper", arguments);
QVERIFY2(testProcess.waitForStarted(),
qPrintable(QString::fromLatin1("Cannot start 'modal_helper': %1").arg(testProcess.errorString())));
QVERIFY(testProcess.waitForFinished(20000));

View File

@ -1,18 +1,10 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: Fix denial-of-service in Qt SQL ODBC driver plugin
Description: Fix denial-of-service in Qt SQL ODBC driver plugin
Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-24607-qtbase-5.15.diff
Last-Update: 2023-02-26
---
src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 206 +++++++++++++++++-------------
1 file changed, 118 insertions(+), 88 deletions(-)
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
index 5f51de3..6cac60d 100644
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
@@ -92,23 +92,39 @@ inline static QString fromSQLTCHAR(const QVarLengthArray<SQLTCHAR>& input, int s
@@ -92,23 +92,39 @@ inline static QString fromSQLTCHAR(const
return result;
}
@ -81,7 +73,7 @@ index 5f51de3..6cac60d 100644
bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
{
@@ -798,10 +822,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
@@ -798,10 +822,7 @@ bool QODBCDriverPrivate::setConnectionOp
v = val.toUInt();
r = SQLSetConnectAttr(hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CURRENT_CATALOG")) {
@ -93,7 +85,7 @@ index 5f51de3..6cac60d 100644
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_METADATA_ID")) {
if (val.toUpper() == QLatin1String("SQL_TRUE")) {
v = SQL_TRUE;
@@ -816,10 +837,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
@@ -816,10 +837,7 @@ bool QODBCDriverPrivate::setConnectionOp
v = val.toUInt();
r = SQLSetConnectAttr(hDbc, SQL_ATTR_PACKET_SIZE, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACEFILE")) {
@ -105,7 +97,7 @@ index 5f51de3..6cac60d 100644
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACE")) {
if (val.toUpper() == QLatin1String("SQL_OPT_TRACE_OFF")) {
v = SQL_OPT_TRACE_OFF;
@@ -1022,9 +1040,12 @@ bool QODBCResult::reset (const QString& query)
@@ -1022,9 +1040,12 @@ bool QODBCResult::reset (const QString&
return false;
}
@ -121,7 +113,7 @@ index 5f51de3..6cac60d 100644
if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO && r!= SQL_NO_DATA) {
setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
"Unable to execute statement"), QSqlError::StatementError, d));
@@ -1371,9 +1392,12 @@ bool QODBCResult::prepare(const QString& query)
@@ -1371,9 +1392,12 @@ bool QODBCResult::prepare(const QString&
return false;
}
@ -210,7 +202,7 @@ index 5f51de3..6cac60d 100644
}
break;
}
@@ -1966,14 +1992,16 @@ bool QODBCDriver::open(const QString & db,
@@ -1966,14 +1992,16 @@ bool QODBCDriver::open(const QString & d
SQLSMALLINT cb;
QVarLengthArray<SQLTCHAR> connOut(1024);
memset(connOut.data(), 0, connOut.size() * sizeof(SQLTCHAR));
@ -235,7 +227,7 @@ index 5f51de3..6cac60d 100644
if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) {
setLastError(qMakeError(tr("Unable to connect"), QSqlError::ConnectionError, d));
@@ -2352,17 +2380,15 @@ QStringList QODBCDriver::tables(QSql::TableType type) const
@@ -2352,17 +2380,15 @@ QStringList QODBCDriver::tables(QSql::Ta
if (tableType.isEmpty())
return tl;
@ -261,7 +253,7 @@ index 5f51de3..6cac60d 100644
if (r != SQL_SUCCESS)
qSqlWarning(QLatin1String("QODBCDriver::tables Unable to execute table list"), d);
@@ -2436,28 +2462,30 @@ QSqlIndex QODBCDriver::primaryIndex(const QString& tablename) const
@@ -2436,28 +2462,30 @@ QSqlIndex QODBCDriver::primaryIndex(cons
SQL_ATTR_CURSOR_TYPE,
(SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
SQL_IS_UINTEGER);
@ -309,7 +301,7 @@ index 5f51de3..6cac60d 100644
if (r != SQL_SUCCESS) {
qSqlWarning(QLatin1String("QODBCDriver::primaryIndex: Unable to execute primary key list"), d);
@@ -2538,15 +2566,17 @@ QSqlRecord QODBCDriver::record(const QString& tablename) const
@@ -2538,15 +2566,17 @@ QSqlRecord QODBCDriver::record(const QSt
SQL_ATTR_CURSOR_TYPE,
(SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
SQL_IS_UINTEGER);

18
debian/patches/CVE-2023-32762.diff vendored Normal file
View File

@ -0,0 +1,18 @@
Description: hsts: match header names case insensitively
Header field names are always considered to be case-insensitive.
Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-32762-qtbase-5.15.diff
Last-Update: 2023-05-22
--- a/src/network/access/qhsts.cpp
+++ b/src/network/access/qhsts.cpp
@@ -364,8 +364,8 @@ quoted-pair = "\" CHAR
bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
{
for (const auto &h : headers) {
- // We use '==' since header name was already 'trimmed' for us:
- if (h.first == "Strict-Transport-Security") {
+ // We compare directly because header name was already 'trimmed' for us:
+ if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
header = h.second;
// RFC6797, 8.1:
//

50
debian/patches/CVE-2023-32763.diff vendored Normal file
View File

@ -0,0 +1,50 @@
Description: fix buffer overflow in Qt SVG
Adds qAddOverflow and qMulOverflow definitions to QFixed.
Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-32763-qtbase-5.15.diff
Last-Update: 2023-05-22
--- a/src/gui/painting/qfixed_p.h
+++ b/src/gui/painting/qfixed_p.h
@@ -54,6 +54,7 @@
#include <QtGui/private/qtguiglobal_p.h>
#include "QtCore/qdebug.h"
#include "QtCore/qpoint.h"
+#include <QtCore/private/qnumeric_p.h>
#include "QtCore/qsize.h"
QT_BEGIN_NAMESPACE
@@ -182,6 +183,14 @@ Q_DECL_CONSTEXPR inline bool operator<(i
Q_DECL_CONSTEXPR inline bool operator>(const QFixed &f, int i) { return f.value() > i * 64; }
Q_DECL_CONSTEXPR inline bool operator>(int i, const QFixed &f) { return i * 64 > f.value(); }
+inline bool qAddOverflow(QFixed v1, QFixed v2, QFixed *r)
+{
+ int val;
+ bool result = add_overflow(v1.value(), v2.value(), &val);
+ r->setValue(val);
+ return result;
+}
+
#ifndef QT_NO_DEBUG_STREAM
inline QDebug &operator<<(QDebug &dbg, const QFixed &f)
{ return dbg << f.toReal(); }
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -2150,11 +2150,14 @@ found:
eng->maxWidth = qMax(eng->maxWidth, line.textWidth);
} else {
eng->minWidth = qMax(eng->minWidth, lbh.minw);
- eng->maxWidth += line.textWidth;
+ if (qAddOverflow(eng->maxWidth, line.textWidth, &eng->maxWidth))
+ eng->maxWidth = QFIXED_MAX;
}
- if (line.textWidth > 0 && item < eng->layoutData->items.size())
- eng->maxWidth += lbh.spaceData.textWidth;
+ if (line.textWidth > 0 && item < eng->layoutData->items.size()) {
+ if (qAddOverflow(eng->maxWidth, lbh.spaceData.textWidth, &eng->maxWidth))
+ eng->maxWidth = QFIXED_MAX;
+ }
line.textWidth += trailingSpace;
if (lbh.spaceData.length) {

77
debian/patches/CVE-2023-33285.diff vendored Normal file
View File

@ -0,0 +1,77 @@
Description: QDnsLookup/Unix: make sure we don't overflow the buffer
The DNS Records are variable length and encode their size in 16 bits
before the Record Data (RDATA). Ensure that both the RDATA and the
Record header fields before it fall inside the buffer we have.
.
Additionally reject any replies containing more than one query records.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=7dba2c87619d558a
Last-Update: 2023-05-25
--- a/src/network/kernel/qdnslookup_unix.cpp
+++ b/src/network/kernel/qdnslookup_unix.cpp
@@ -227,7 +227,6 @@ void QDnsLookupRunnable::query(const int
// responseLength in case of error, we still can extract the
// exact error code from the response.
HEADER *header = (HEADER*)response;
- const int answerCount = ntohs(header->ancount);
switch (header->rcode) {
case NOERROR:
break;
@@ -260,18 +259,31 @@ void QDnsLookupRunnable::query(const int
return;
}
- // Skip the query host, type (2 bytes) and class (2 bytes).
char host[PACKETSZ], answer[PACKETSZ];
unsigned char *p = response + sizeof(HEADER);
- int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
- if (status < 0) {
+ int status;
+
+ if (ntohs(header->qdcount) == 1) {
+ // Skip the query host, type (2 bytes) and class (2 bytes).
+ status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
+ if (status < 0) {
+ reply->error = QDnsLookup::InvalidReplyError;
+ reply->errorString = tr("Could not expand domain name");
+ return;
+ }
+ if ((p - response) + status + 4 >= responseLength)
+ header->qdcount = 0xffff; // invalid reply below
+ else
+ p += status + 4;
+ }
+ if (ntohs(header->qdcount) > 1) {
reply->error = QDnsLookup::InvalidReplyError;
- reply->errorString = tr("Could not expand domain name");
+ reply->errorString = tr("Invalid reply received");
return;
}
- p += status + 4;
// Extract results.
+ const int answerCount = ntohs(header->ancount);
int answerIndex = 0;
while ((p < response + responseLength) && (answerIndex < answerCount)) {
status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
@@ -283,6 +295,11 @@ void QDnsLookupRunnable::query(const int
const QString name = QUrl::fromAce(host);
p += status;
+
+ if ((p - response) + 10 > responseLength) {
+ // probably just a truncated reply, return what we have
+ return;
+ }
const quint16 type = (p[0] << 8) | p[1];
p += 2; // RR type
p += 2; // RR class
@@ -290,6 +307,8 @@ void QDnsLookupRunnable::query(const int
p += 4;
const quint16 size = (p[0] << 8) | p[1];
p += 2;
+ if ((p - response) + size > responseLength)
+ return; // truncated
if (type == QDnsLookup::A) {
if (size != 4) {

34
debian/patches/CVE-2023-34410.diff vendored Normal file
View File

@ -0,0 +1,34 @@
Description: Ssl: Copy the on-demand cert loading bool from default config
Otherwise individual sockets will still load system certificates when
a chain doesn't match against the configured CA certificates.
That's not intended behavior, since specifically setting the CA
certificates means you don't want the system certificates to be used.
.
This is potentially a breaking change because now, if you ever add a
CA to the default config, it will disable loading system certificates
on demand for all sockets. And the only way to re-enable it is to
create a null-QSslConfiguration and set it as the new default.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=57ba6260c0801055
Last-Update: 2023-06-08
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -2221,6 +2221,10 @@ QSslSocketPrivate::QSslSocketPrivate()
, flushTriggered(false)
{
QSslConfigurationPrivate::deepCopyDefaultConfiguration(&configuration);
+ // If the global configuration doesn't allow root certificates to be loaded
+ // on demand then we have to disable it for this socket as well.
+ if (!configuration.allowRootCertOnDemandLoading)
+ allowRootCertOnDemandLoading = false;
}
/*!
@@ -2470,6 +2474,7 @@ void QSslConfigurationPrivate::deepCopyD
ptr->sessionProtocol = global->sessionProtocol;
ptr->ciphers = global->ciphers;
ptr->caCertificates = global->caCertificates;
+ ptr->allowRootCertOnDemandLoading = global->allowRootCertOnDemandLoading;
ptr->protocol = global->protocol;
ptr->peerVerifyMode = global->peerVerifyMode;
ptr->peerVerifyDepth = global->peerVerifyDepth;

289
debian/patches/CVE-2023-37369.diff vendored Normal file
View File

@ -0,0 +1,289 @@
Description: QXmlStreamReader: make fastScanName() indicate parsing status to callers
This fixes a crash while parsing an XML file with garbage data, the file
starts with '<' then garbage data:
- The loop in the parse() keeps iterating until it hits "case 262:",
which calls fastScanName()
- fastScanName() iterates over the text buffer scanning for the
attribute name (e.g. "xml:lang"), until it finds ':'
- Consider a Value val, fastScanName() is called on it, it would set
val.prefix to a number > val.len, then it would hit the 4096 condition
and return (returned 0, now it returns the equivalent of
std::null_opt), which means that val.len doesn't get modified, making
it smaller than val.prefix
- The code would try constructing an XmlStringRef with negative length,
which would hit an assert in one of QStringView's constructors
.
Add an assert to the XmlStringRef constructor.
.
Add unittest based on the file from the bug report.
.
Credit to OSS-Fuzz.
Origin: upstream, commits
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1a423ce4372d18a7
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6326bec46a618c72
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=bdc8dc51380d2ce4
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3bc3b8d69a291aa5
.
Based on KDE's backport:
https://invent.kde.org/qt/qt/qtbase/-/merge_requests/263
Last-Update: 2023-07-15
--- a/src/corelib/serialization/qxmlstream.cpp
+++ b/src/corelib/serialization/qxmlstream.cpp
@@ -1302,15 +1302,18 @@ inline int QXmlStreamReaderPrivate::fast
return n;
}
-inline int QXmlStreamReaderPrivate::fastScanName(int *prefix)
+// Fast scan an XML attribute name (e.g. "xml:lang").
+inline QXmlStreamReaderPrivate::FastScanNameResult
+QXmlStreamReaderPrivate::fastScanName(Value *val)
{
int n = 0;
uint c;
while ((c = getChar()) != StreamEOF) {
if (n >= 4096) {
// This is too long to be a sensible name, and
- // can exhaust memory
- return 0;
+ // can exhaust memory, or the range of decltype(*prefix)
+ raiseNamePrefixTooLongError();
+ return {};
}
switch (c) {
case '\n':
@@ -1339,23 +1342,23 @@ inline int QXmlStreamReaderPrivate::fast
case '+':
case '*':
putChar(c);
- if (prefix && *prefix == n+1) {
- *prefix = 0;
+ if (val && val->prefix == n + 1) {
+ val->prefix = 0;
putChar(':');
--n;
}
- return n;
+ return FastScanNameResult(n);
case ':':
- if (prefix) {
- if (*prefix == 0) {
- *prefix = n+2;
+ if (val) {
+ if (val->prefix == 0) {
+ val->prefix = n + 2;
} else { // only one colon allowed according to the namespace spec.
putChar(c);
- return n;
+ return FastScanNameResult(n);
}
} else {
putChar(c);
- return n;
+ return FastScanNameResult(n);
}
Q_FALLTHROUGH();
default:
@@ -1364,12 +1367,12 @@ inline int QXmlStreamReaderPrivate::fast
}
}
- if (prefix)
- *prefix = 0;
+ if (val)
+ val->prefix = 0;
int pos = textBuffer.size() - n;
putString(textBuffer, pos);
textBuffer.resize(pos);
- return 0;
+ return FastScanNameResult(0);
}
enum NameChar { NameBeginning, NameNotBeginning, NotName };
@@ -1878,6 +1881,14 @@ void QXmlStreamReaderPrivate::raiseWellF
raiseError(QXmlStreamReader::NotWellFormedError, message);
}
+void QXmlStreamReaderPrivate::raiseNamePrefixTooLongError()
+{
+ // TODO: add a ImplementationLimitsExceededError and use it instead
+ raiseError(QXmlStreamReader::NotWellFormedError,
+ QXmlStream::tr("Length of XML attribute name exceeds implementation limits (4KiB "
+ "characters)."));
+}
+
void QXmlStreamReaderPrivate::parseError()
{
--- a/src/corelib/serialization/qxmlstream.g
+++ b/src/corelib/serialization/qxmlstream.g
@@ -516,7 +516,16 @@ public:
int fastScanLiteralContent();
int fastScanSpace();
int fastScanContentCharList();
- int fastScanName(int *prefix = nullptr);
+
+ struct FastScanNameResult {
+ FastScanNameResult() : ok(false) {}
+ explicit FastScanNameResult(int len) : addToLen(len), ok(true) { }
+ operator bool() { return ok; }
+ int operator*() { Q_ASSERT(ok); return addToLen; }
+ int addToLen;
+ bool ok;
+ };
+ FastScanNameResult fastScanName(Value *val = nullptr);
inline int fastScanNMTOKEN();
@@ -525,6 +534,7 @@ public:
void raiseError(QXmlStreamReader::Error error, const QString& message = QString());
void raiseWellFormedError(const QString &message);
+ void raiseNamePrefixTooLongError();
QXmlStreamEntityResolver *entityResolver;
@@ -1811,7 +1821,12 @@ space_opt ::= space;
qname ::= LETTER;
/.
case $rule_number: {
- sym(1).len += fastScanName(&sym(1).prefix);
+ Value &val = sym(1);
+ if (auto res = fastScanName(&val))
+ val.len += *res;
+ else
+ return false;
+
if (atEnd) {
resume($rule_number);
return false;
@@ -1822,7 +1837,11 @@ qname ::= LETTER;
name ::= LETTER;
/.
case $rule_number:
- sym(1).len += fastScanName();
+ if (auto res = fastScanName())
+ sym(1).len += *res;
+ else
+ return false;
+
if (atEnd) {
resume($rule_number);
return false;
--- a/src/corelib/serialization/qxmlstream_p.h
+++ b/src/corelib/serialization/qxmlstream_p.h
@@ -1005,7 +1005,16 @@ public:
int fastScanLiteralContent();
int fastScanSpace();
int fastScanContentCharList();
- int fastScanName(int *prefix = nullptr);
+
+ struct FastScanNameResult {
+ FastScanNameResult() : ok(false) {}
+ explicit FastScanNameResult(int len) : addToLen(len), ok(true) { }
+ operator bool() { return ok; }
+ int operator*() { Q_ASSERT(ok); return addToLen; }
+ int addToLen;
+ bool ok;
+ };
+ FastScanNameResult fastScanName(Value *val = nullptr);
inline int fastScanNMTOKEN();
@@ -1014,6 +1023,7 @@ public:
void raiseError(QXmlStreamReader::Error error, const QString& message = QString());
void raiseWellFormedError(const QString &message);
+ void raiseNamePrefixTooLongError();
QXmlStreamEntityResolver *entityResolver;
@@ -1939,7 +1949,12 @@ bool QXmlStreamReaderPrivate::parse()
break;
case 262: {
- sym(1).len += fastScanName(&sym(1).prefix);
+ Value &val = sym(1);
+ if (auto res = fastScanName(&val))
+ val.len += *res;
+ else
+ return false;
+
if (atEnd) {
resume(262);
return false;
@@ -1947,7 +1962,11 @@ bool QXmlStreamReaderPrivate::parse()
} break;
case 263:
- sym(1).len += fastScanName();
+ if (auto res = fastScanName())
+ sym(1).len += *res;
+ else
+ return false;
+
if (atEnd) {
resume(263);
return false;
--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
@@ -42,6 +42,7 @@
#include "qc14n.h"
+Q_DECLARE_METATYPE(QXmlStreamReader::Error)
Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour)
static const char *const catalogFile = "XML-Test-Suite/xmlconf/finalCatalog.xml";
@@ -587,6 +588,8 @@ private slots:
void readBack() const;
void roundTrip() const;
void roundTrip_data() const;
+ void test_fastScanName_data() const;
+ void test_fastScanName() const;
void entityExpansionLimit() const;
@@ -1842,5 +1845,42 @@ void tst_QXmlStream::roundTrip() const
QCOMPARE(out, in);
}
+void tst_QXmlStream::test_fastScanName_data() const
+{
+ QTest::addColumn<QByteArray>("data");
+ QTest::addColumn<QXmlStreamReader::Error>("errorType");
+
+ // 4096 is the limit in QXmlStreamReaderPrivate::fastScanName()
+
+ QByteArray arr = "<a:" + QByteArray("b").repeated(4096 - 1);
+ QTest::newRow("data1") << arr << QXmlStreamReader::PrematureEndOfDocumentError;
+
+ arr = "<a:" + QByteArray("b").repeated(4096);
+ QTest::newRow("data2") << arr << QXmlStreamReader::NotWellFormedError;
+
+ arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96);
+ QTest::newRow("data3") << arr << QXmlStreamReader::PrematureEndOfDocumentError;
+
+ arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96 + 1);
+ QTest::newRow("data4") << arr << QXmlStreamReader::NotWellFormedError;
+
+ arr = "<" + QByteArray("a").repeated(4000 + 1) + ":" + QByteArray("b").repeated(96);
+ QTest::newRow("data5") << arr << QXmlStreamReader::NotWellFormedError;
+}
+
+void tst_QXmlStream::test_fastScanName() const
+{
+ QFETCH(QByteArray, data);
+ QFETCH(QXmlStreamReader::Error, errorType);
+
+ QXmlStreamReader reader(data);
+ QXmlStreamReader::TokenType tokenType;
+ while (!reader.atEnd())
+ tokenType = reader.readNext();
+
+ QCOMPARE(tokenType, QXmlStreamReader::Invalid);
+ QCOMPARE(reader.error(), errorType);
+}
+
#include "tst_qxmlstream.moc"
// vim: et:ts=4:sw=4:sts=4

364
debian/patches/CVE-2023-38197.diff vendored Normal file
View File

@ -0,0 +1,364 @@
Description: QXmlStreamReader: Raise error on unexpected tokens
QXmlStreamReader accepted multiple DOCTYPE elements, containing DTD
fragments in the XML prolog, and in the XML body.
Well-formed but invalid XML files - with multiple DTD fragments in
prolog and body, combined with recursive entity expansions - have
caused infinite loops in QXmlStreamReader.
.
This patch implements a token check in QXmlStreamReader.
A stream is allowed to start with an XML prolog. StartDocument
and DOCTYPE elements are only allowed in this prolog, which
may also contain ProcessingInstruction and Comment elements.
As soon as anything else is seen, the prolog ends.
After that, the prolog-specific elements are treated as unexpected.
Furthermore, the prolog can contain at most one DOCTYPE element.
.
Update the documentation to reflect the new behavior.
Add an autotest that checks the new error cases are correctly detected,
and no error is raised for legitimate input.
.
The original OSS-Fuzz files (see bug reports) are not included in this
patch for file size reasons. They have been tested manually. Each of
them has more than one DOCTYPE element, causing infinite loops in
recursive entity expansions. The newly implemented functionality
detects those invalid DTD fragments. By raising an error, it aborts
stream reading before an infinite loop occurs.
.
Thanks to OSS-Fuzz for finding this.
Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-38197-qtbase-5.15.diff
Last-Update: 2023-07-15
--- a/src/corelib/serialization/qxmlstream.cpp
+++ b/src/corelib/serialization/qxmlstream.cpp
@@ -160,7 +160,7 @@ enum { StreamEOF = ~0U };
addData() or by waiting for it to arrive on the device().
\value UnexpectedElementError The parser encountered an element
- that was different to those it expected.
+ or token that was different to those it expected.
*/
@@ -295,13 +295,34 @@ QXmlStreamEntityResolver *QXmlStreamRead
QXmlStreamReader is a well-formed XML 1.0 parser that does \e not
include external parsed entities. As long as no error occurs, the
- application code can thus be assured that the data provided by the
- stream reader satisfies the W3C's criteria for well-formed XML. For
- example, you can be certain that all tags are indeed nested and
- closed properly, that references to internal entities have been
- replaced with the correct replacement text, and that attributes have
- been normalized or added according to the internal subset of the
- DTD.
+ application code can thus be assured, that
+ \list
+ \li the data provided by the stream reader satisfies the W3C's
+ criteria for well-formed XML,
+ \li tokens are provided in a valid order.
+ \endlist
+
+ Unless QXmlStreamReader raises an error, it guarantees the following:
+ \list
+ \li All tags are nested and closed properly.
+ \li References to internal entities have been replaced with the
+ correct replacement text.
+ \li Attributes have been normalized or added according to the
+ internal subset of the \l DTD.
+ \li Tokens of type \l StartDocument happen before all others,
+ aside from comments and processing instructions.
+ \li At most one DOCTYPE element (a token of type \l DTD) is present.
+ \li If present, the DOCTYPE appears before all other elements,
+ aside from StartDocument, comments and processing instructions.
+ \endlist
+
+ In particular, once any token of type \l StartElement, \l EndElement,
+ \l Characters, \l EntityReference or \l EndDocument is seen, no
+ tokens of type StartDocument or DTD will be seen. If one is present in
+ the input stream, out of order, an error is raised.
+
+ \note The token types \l Comment and \l ProcessingInstruction may appear
+ anywhere in the stream.
If an error occurs while parsing, atEnd() and hasError() return
true, and error() returns the error that occurred. The functions
@@ -620,6 +641,7 @@ QXmlStreamReader::TokenType QXmlStreamRe
d->token = -1;
return readNext();
}
+ d->checkToken();
return d->type;
}
@@ -740,6 +762,14 @@ static const short QXmlStreamReader_toke
};
+static const char QXmlStreamReader_XmlContextString[] =
+ "Prolog\0"
+ "Body\0";
+
+static const short QXmlStreamReader_XmlContextString_indices[] = {
+ 0, 7
+};
+
/*!
\property QXmlStreamReader::namespaceProcessing
The namespace-processing flag of the stream reader
@@ -775,6 +805,16 @@ QString QXmlStreamReader::tokenString()
QXmlStreamReader_tokenTypeString_indices[d->type]);
}
+/*!
+ \internal
+ \return \param ctxt (Prolog/Body) as a string.
+ */
+QString contextString(QXmlStreamReaderPrivate::XmlContext ctxt)
+{
+ return QLatin1String(QXmlStreamReader_XmlContextString +
+ QXmlStreamReader_XmlContextString_indices[static_cast<int>(ctxt)]);
+}
+
#endif // QT_NO_XMLSTREAMREADER
QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack()
@@ -866,6 +906,8 @@ void QXmlStreamReaderPrivate::init()
type = QXmlStreamReader::NoToken;
error = QXmlStreamReader::NoError;
+ currentContext = XmlContext::Prolog;
+ foundDTD = false;
}
/*
@@ -4061,6 +4103,92 @@ void QXmlStreamWriter::writeCurrentToken
}
}
+static bool isTokenAllowedInContext(QXmlStreamReader::TokenType type,
+ QXmlStreamReaderPrivate::XmlContext loc)
+{
+ switch (type) {
+ case QXmlStreamReader::StartDocument:
+ case QXmlStreamReader::DTD:
+ return loc == QXmlStreamReaderPrivate::XmlContext::Prolog;
+
+ case QXmlStreamReader::StartElement:
+ case QXmlStreamReader::EndElement:
+ case QXmlStreamReader::Characters:
+ case QXmlStreamReader::EntityReference:
+ case QXmlStreamReader::EndDocument:
+ return loc == QXmlStreamReaderPrivate::XmlContext::Body;
+
+ case QXmlStreamReader::Comment:
+ case QXmlStreamReader::ProcessingInstruction:
+ return true;
+
+ case QXmlStreamReader::NoToken:
+ case QXmlStreamReader::Invalid:
+ return false;
+ default:
+ return false;
+ }
+}
+
+/*!
+ \internal
+ \brief QXmlStreamReader::isValidToken
+ \return \c true if \param type is a valid token type.
+ \return \c false if \param type is an unexpected token,
+ which indicates a non-well-formed or invalid XML stream.
+ */
+bool QXmlStreamReaderPrivate::isValidToken(QXmlStreamReader::TokenType type)
+{
+ // Don't change currentContext, if Invalid or NoToken occur in the prolog
+ if (type == QXmlStreamReader::Invalid || type == QXmlStreamReader::NoToken)
+ return false;
+
+ // If a token type gets rejected in the body, there is no recovery
+ const bool result = isTokenAllowedInContext(type, currentContext);
+ if (result || currentContext == XmlContext::Body)
+ return result;
+
+ // First non-Prolog token observed => switch context to body and check again.
+ currentContext = XmlContext::Body;
+ return isTokenAllowedInContext(type, currentContext);
+}
+
+/*!
+ \internal
+ Checks token type and raises an error, if it is invalid
+ in the current context (prolog/body).
+ */
+void QXmlStreamReaderPrivate::checkToken()
+{
+ Q_Q(QXmlStreamReader);
+
+ // The token type must be consumed, to keep track if the body has been reached.
+ const XmlContext context = currentContext;
+ const bool ok = isValidToken(type);
+
+ // Do nothing if an error has been raised already (going along with an unexpected token)
+ if (error != QXmlStreamReader::Error::NoError)
+ return;
+
+ if (!ok) {
+ raiseError(QXmlStreamReader::UnexpectedElementError,
+ QLatin1String("Unexpected token type %1 in %2.")
+ .arg(q->tokenString(), contextString(context)));
+ return;
+ }
+
+ if (type != QXmlStreamReader::DTD)
+ return;
+
+ // Raise error on multiple DTD tokens
+ if (foundDTD) {
+ raiseError(QXmlStreamReader::UnexpectedElementError,
+ QLatin1String("Found second DTD token in %1.").arg(contextString(context)));
+ } else {
+ foundDTD = true;
+ }
+}
+
/*!
\fn bool QXmlStreamAttributes::hasAttribute(const QString &qualifiedName) const
\since 4.5
--- a/src/corelib/serialization/qxmlstream_p.h
+++ b/src/corelib/serialization/qxmlstream_p.h
@@ -804,6 +804,17 @@ public:
#endif
bool atEnd;
+ enum class XmlContext
+ {
+ Prolog,
+ Body,
+ };
+
+ XmlContext currentContext = XmlContext::Prolog;
+ bool foundDTD = false;
+ bool isValidToken(QXmlStreamReader::TokenType type);
+ void checkToken();
+
/*!
\sa setType()
*/
--- /dev/null
+++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE TEST [
+ <!ELEMENT TESTATTRIBUTE (CASE+)>
+ <!ELEMENT CASE (CLASS, FUNCTION)>
+ <!ELEMENT CLASS (#PCDATA)>
+
+ <!-- adding random ENTITY statement, as this is typical DTD content -->
+ <!ENTITY unite "&#x222a;">
+
+ <!ATTLIST CASE CLASS CDATA #REQUIRED>
+]>
+<TEST>
+ <CASE>
+ <CLASS>tst_QXmlStream</CLASS>
+ </CASE>
+ <!-- invalid DTD in XML body follows -->
+ <!DOCTYPE DTDTEST [
+ <!ELEMENT RESULT (CASE+)>
+ <!ATTLIST RESULT OUTPUT CDATA #REQUIRED>
+ ]>
+</TEST>
--- /dev/null
+++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE TEST [
+ <!ELEMENT TESTATTRIBUTE (CASE+)>
+ <!ELEMENT CASE (CLASS, FUNCTION, DATASET, COMMENTS)>
+ <!ELEMENT CLASS (#PCDATA)>
+
+ <!-- adding random ENTITY statements, as this is typical DTD content -->
+ <!ENTITY iff "&hArr;">
+
+ <!ATTLIST CASE CLASS CDATA #REQUIRED>
+]>
+<!-- invalid second DTD follows -->
+<!DOCTYPE SECOND [
+ <!ELEMENT SECONDATTRIBUTE (#PCDATA)>
+ <!ENTITY on "&#8728;">
+]>
+<TEST>
+ <CASE>
+ <CLASS>tst_QXmlStream</CLASS>
+ </CASE>
+</TEST>
--- /dev/null
+++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE TEST [
+ <!ELEMENT TESTATTRIBUTE (CASE+)>
+ <!ELEMENT CASE (CLASS, FUNCTION, DATASET, COMMENTS)>
+ <!ELEMENT CLASS (#PCDATA)>
+
+ <!-- adding random ENTITY statements, as this is typical DTD content -->
+ <!ENTITY unite "&#x222a;">
+
+ <!ATTLIST CASE CLASS CDATA #REQUIRED>
+]>
+<TEST>
+ <CASE>
+ <CLASS>tst_QXmlStream</CLASS>
+ </CASE>
+</TEST>
--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
@@ -593,6 +593,9 @@ private slots:
void entityExpansionLimit() const;
+ void tokenErrorHandling_data() const;
+ void tokenErrorHandling() const;
+
private:
static QByteArray readFile(const QString &filename);
@@ -1882,5 +1885,42 @@ void tst_QXmlStream::test_fastScanName()
QCOMPARE(reader.error(), errorType);
}
+void tst_QXmlStream::tokenErrorHandling_data() const
+{
+ qRegisterMetaType<QXmlStreamReader::Error>();
+ QTest::addColumn<QString>("fileName");
+ QTest::addColumn<QXmlStreamReader::Error>("expectedError");
+ QTest::addColumn<QString>("errorKeyWord");
+
+ constexpr auto invalid = QXmlStreamReader::Error::UnexpectedElementError;
+ constexpr auto valid = QXmlStreamReader::Error::NoError;
+ QTest::newRow("DtdInBody") << "dtdInBody.xml" << invalid << "DTD";
+ QTest::newRow("multipleDTD") << "multipleDtd.xml" << invalid << "second DTD";
+ QTest::newRow("wellFormed") << "wellFormed.xml" << valid << "";
+}
+
+void tst_QXmlStream::tokenErrorHandling() const
+{
+ QFETCH(const QString, fileName);
+ QFETCH(const QXmlStreamReader::Error, expectedError);
+ QFETCH(const QString, errorKeyWord);
+
+ const QDir dir(QFINDTESTDATA("tokenError"));
+ QFile file(dir.absoluteFilePath(fileName));
+
+ // Cross-compiling: File will be on host only
+ if (!file.exists())
+ QSKIP("Testfile not found.");
+
+ file.open(QIODevice::ReadOnly);
+ QXmlStreamReader reader(&file);
+ while (!reader.atEnd())
+ reader.readNext();
+
+ QCOMPARE(reader.error(), expectedError);
+ if (expectedError != QXmlStreamReader::Error::NoError)
+ QVERIFY(reader.errorString().contains(errorKeyWord));
+}
+
#include "tst_qxmlstream.moc"
// vim: et:ts=4:sw=4:sts=4

31
debian/patches/a11y_root.diff vendored Normal file
View File

@ -0,0 +1,31 @@
Description: fix accessibility on XCB when running as root
Accessibility actually works when running applications as root, but we
would never properly connect, since the enabledChanged signal would be
emitted from the constructor in this case. So after connecting the
signal, check the value by hand to make sure not to miss the
notification.
.
Only applications running as root would be affected, because all other
applications would go through the asynchronous pattern of getting the
bus address from dbus instead.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=db346e711c9af505
Bug: https://bugs.debian.org/1033995
Last-Update: 2023-04-15
--- a/src/platformsupport/linuxaccessibility/bridge.cpp
+++ b/src/platformsupport/linuxaccessibility/bridge.cpp
@@ -65,6 +65,14 @@ QSpiAccessibleBridge::QSpiAccessibleBrid
{
dbusConnection = new DBusConnection();
connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool)));
+ // Now that we have connected the signal, make sure we didn't miss a change,
+ // e.g. when running as root or when AT_SPI_BUS_ADDRESS is set by hand.
+ // But do that only on next loop, once dbus is really settled.
+ QTimer::singleShot(
+ 0, this, [this]{
+ if (dbusConnection->isEnabled())
+ enabledChanged(true);
+ });
}
void QSpiAccessibleBridge::enabledChanged(bool enabled)

View File

@ -1,15 +1,8 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: support ARMv4 architecture, needed for armel builds
Description: support ARMv4 architecture, needed for armel builds
Author: Dmitry Shachnev <mitya57@debian.org>
Forwarded: no
Last-Update: 2016-07-01
---
src/corelib/global/qprocessordetection.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index 8d65720..a6ead54 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -132,6 +132,8 @@

View File

@ -1,14 +1,7 @@
From: Rex Dieter <rdieter@gmail.com>
Date: Fri, 5 May 2023 07:44:34 +0000
Subject: properly cast types for libglvnd 1.3.4
Description: properly cast types for libglvnd 1.3.4
Origin: https://src.fedoraproject.org/rpms/qt5-qtbase/blob/rawhide/f/qtbase-everywhere-src-5.15.2-libglvnd.patch
---
src/gui/configure.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Author: Rex Dieter <rdieter@gmail.com>
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 1f08795..f159568 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -838,9 +838,9 @@

View File

@ -1,24 +1,13 @@
From: Helmut Grohne <helmut@subdivi.de>
Date: Fri, 5 May 2023 07:44:34 +0000
Subject: call pkgconfig in order to be able to cross build qtbase with MySql.
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Description: call pkgconfig in order to be able to cross build qtbase with MySql.
Qt's build system calls mysql_config... which won't work in a cross build
environment like Debian's, as it will throw an exec format error.
.
In order to solve this call pkgconfig and use mysqlclient.pc.
Author: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971604
Forwarded: not-needed
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Qt's build system calls mysql_config... which won't work in a cross build
environment like Debian's, as it will throw an exec format error.
In order to solve this call pkgconfig and use mysqlclient.pc.
---
src/plugins/sqldrivers/configure.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 9db93d6..5c35cd9 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -67,6 +67,7 @@

39
debian/patches/dont_use_O_PATH.diff vendored Normal file
View File

@ -0,0 +1,39 @@
Description: OpenFile portal: do not use O_PATH fds
Using O_PATH requires correctly specifying whether the fd is writable or
not. Stating that the fd is writable without it actually being writable
results into rejection on xdg-desktop-portal side. Other implementations
like xdg-open or gtk have also moved away from O_PATH fds so this will
make a matching implementation and avoid possible rejections from xdp.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=03cbcba7b2b0e42a
Last-Update: 2023-05-13
--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
@@ -203,8 +203,7 @@ static inline QDBusMessage xdgDesktopPor
// handle_token (s) - A string that will be used as the last element of the @handle.
// writable (b) - Whether to allow the chosen application to write to the file.
-#ifdef O_PATH
- const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH);
+ const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_RDONLY);
if (fd != -1) {
QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"),
QLatin1String("/org/freedesktop/portal/desktop"),
@@ -214,16 +213,13 @@ static inline QDBusMessage xdgDesktopPor
QDBusUnixFileDescriptor descriptor;
descriptor.giveFileDescriptor(fd);
- const QVariantMap options = {{QLatin1String("writable"), true}};
+ const QVariantMap options = {};
// FIXME parent_window_id
message << QString() << QVariant::fromValue(descriptor) << options;
return QDBusConnection::sessionBus().call(message);
}
-#else
- Q_UNUSED(url)
-#endif
return QDBusMessage::createError(QDBusError::InternalError, qt_error_string());
}

View File

@ -1,30 +1,17 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: fix Alt+` shortcut on non-US layouts
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Description: fix Alt+` shortcut on non-US layouts
Make it possible for non-letter-keys with Latin 1 symbols (`, !, @ etc.)
to participate in shortcuts also, when the keys generate national
symbols on non-Latin layout.
.
For example, in Russian layout, "`" key generates cyrillic "ё" letter of
national alphabet, so shortcuts with the key should still work
regardless of the actual layout.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit?id=62e697fd568f6acd
Last-Update: 2022-12-03
Make it possible for non-letter-keys with Latin 1 symbols (`, !, @ etc.)
to participate in shortcuts also, when the keys generate national
symbols on non-Latin layout.
For example, in Russian layout, "`" key generates cyrillic "ё" letter of
national alphabet, so shortcuts with the key should still work
regardless of the actual layout.
---
src/platformsupport/input/xkbcommon/qxkbcommon.cpp | 12 ++++++------
src/platformsupport/input/xkbcommon/qxkbcommon_p.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
index b713c19..0c8545b 100644
--- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
+++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
@@ -471,7 +471,7 @@ QVector<xkb_keysym_t> QXkbCommon::toKeysym(QKeyEvent *event)
@@ -471,7 +471,7 @@ QVector<xkb_keysym_t> QXkbCommon::toKeys
} else if (event->modifiers() & Qt::KeypadModifier) {
if (qtKey >= Qt::Key_0 && qtKey <= Qt::Key_9)
keysyms.append(XKB_KEY_KP_0 + (qtKey - Qt::Key_0));
@ -33,7 +20,7 @@ index b713c19..0c8545b 100644
keysyms.append(qtKey);
}
@@ -523,7 +523,7 @@ int QXkbCommon::keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers modifie
@@ -523,7 +523,7 @@ int QXkbCommon::keysymToQtKey(xkb_keysym
// With standard shortcuts we should prefer a latin character, this is
// for checks like "some qkeyevent == QKeySequence::Copy" to work even
// when using for example 'russian' keyboard layout.
@ -42,7 +29,7 @@ index b713c19..0c8545b 100644
xkb_keysym_t latinKeysym = QXkbCommon::lookupLatinKeysym(state, code);
if (latinKeysym != XKB_KEY_NoSymbol)
keysym = latinKeysym;
@@ -546,7 +546,7 @@ static int keysymToQtKey_internal(xkb_keysym_t keysym, Qt::KeyboardModifiers mod
@@ -546,7 +546,7 @@ static int keysymToQtKey_internal(xkb_ke
} else if (keysym >= XKB_KEY_KP_0 && keysym <= XKB_KEY_KP_9) {
// numeric keypad keys
qtKey = Qt::Key_0 + (keysym - XKB_KEY_KP_0);
@ -51,7 +38,7 @@ index b713c19..0c8545b 100644
qtKey = QXkbCommon::qxkbcommon_xkb_keysym_to_upper(keysym);
} else {
// check if we have a direct mapping
@@ -678,7 +678,7 @@ QList<int> QXkbCommon::possibleKeys(xkb_state *state, const QKeyEvent *event,
@@ -678,7 +678,7 @@ QList<int> QXkbCommon::possibleKeys(xkb_
Qt::KeyboardModifiers neededMods = ModsTbl[i];
if ((modifiers & neededMods) == neededMods) {
if (i == 8) {
@ -60,7 +47,7 @@ index b713c19..0c8545b 100644
continue;
// add a latin key as a fall back key
sym = lookupLatinKeysym(state, keycode);
@@ -733,7 +733,7 @@ void QXkbCommon::verifyHasLatinLayout(xkb_keymap *keymap)
@@ -733,7 +733,7 @@ void QXkbCommon::verifyHasLatinLayout(xk
for (xkb_layout_index_t layout = 0; layout < layoutCount; ++layout) {
for (xkb_keycode_t code = minKeycode; code < maxKeycode; ++code) {
xkb_keymap_key_get_syms_by_level(keymap, code, layout, 0, &keysyms);
@ -69,7 +56,7 @@ index b713c19..0c8545b 100644
nrLatinKeys++;
if (nrLatinKeys > 10) // arbitrarily chosen threshold
return;
@@ -766,7 +766,7 @@ xkb_keysym_t QXkbCommon::lookupLatinKeysym(xkb_state *state, xkb_keycode_t keyco
@@ -766,7 +766,7 @@ xkb_keysym_t QXkbCommon::lookupLatinKeys
xkb_level_index_t level = xkb_state_key_get_level(state, keycode, layout);
if (xkb_keymap_key_get_syms_by_level(keymap, keycode, layout, level, &syms) != 1)
continue;
@ -78,8 +65,6 @@ index b713c19..0c8545b 100644
sym = syms[0];
break;
}
diff --git a/src/platformsupport/input/xkbcommon/qxkbcommon_p.h b/src/platformsupport/input/xkbcommon/qxkbcommon_p.h
index 561eae0..8389bd8 100644
--- a/src/platformsupport/input/xkbcommon/qxkbcommon_p.h
+++ b/src/platformsupport/input/xkbcommon/qxkbcommon_p.h
@@ -94,8 +94,8 @@ public:

32
debian/patches/fix_qdbusmacros_h.diff vendored Normal file
View File

@ -0,0 +1,32 @@
Description: fix capitalization error in auto-generated qdbusmacros.h include
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=dca0304c26012a57
Last-Update: 2023-05-13
--- a/include/QtDBus/qdbusmacros.h
+++ b/include/QtDBus/qdbusmacros.h
@@ -1,11 +1,11 @@
#ifndef DEPRECATED_HEADER_QtDBus_qdbusmacros_h
#define DEPRECATED_HEADER_QtDBus_qdbusmacros_h
#if defined(__GNUC__)
-# warning Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDbus/qtdbusglobal.h> instead.
+# warning Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDBus/qtdbusglobal.h> instead.
#elif defined(_MSC_VER)
-# pragma message ("Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDbus/qtdbusglobal.h> instead.")
+# pragma message ("Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDBus/qtdbusglobal.h> instead.")
#endif
-#include <QtDbus/qtdbusglobal.h>
+#include <QtDBus/qtdbusglobal.h>
#if 0
#pragma qt_no_master_include
#endif
--- a/sync.profile
+++ b/sync.profile
@@ -77,7 +77,7 @@
"qsql.h" => "QtSql/qtsqlglobal.h"
},
"QtDBus" => {
- "qdbusmacros.h" => "QtDbus/qtdbusglobal.h"
+ "qdbusmacros.h" => "QtDBus/qtdbusglobal.h"
},
"QtTest" => {
"qtest_global.h" => "QtTest/qttestglobal.h"

View File

@ -1,69 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:31 +0000
Subject: fix recursion crash when calling setStyleSheet with
qproperty-styleSheet
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=e9cdcc7cb314586a
Last-Update: 2021-11-13
When calling setStyleSheet with property qproperty-styleSheet,
QStyleSheetStyle::polish will call QStyleSheetStyle::setProperties,
and then QStyleSheetStyle::setProperties goes on to call setProperty.
Because there is property qproperty-styleSheet, it will update
stylesheet by calling QStyleSheetStyle::polish.
This causes the recursive call to crash.
---
src/widgets/styles/qstylesheetstyle.cpp | 3 +++
.../styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 9fcb8ba..da88f0b 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -2649,6 +2649,9 @@ void QStyleSheetStyle::setProperties(QWidget *w)
default: v = decl.d->values.at(0).variant; break;
}
+ if (propertyL1 == QByteArray("styleSheet") && value == v)
+ continue;
+
w->setProperty(propertyL1, v);
}
}
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 26868a7..5d67ce5 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -94,6 +94,7 @@ private slots:
void layoutSpacing();
#endif
void qproperty();
+ void qproperty_styleSheet();
void palettePropagation_data();
void palettePropagation();
void fontPropagation_data();
@@ -678,6 +679,23 @@ void tst_QStyleSheetStyle::qproperty()
QCOMPARE(pb.isChecked(), false);
}
+void tst_QStyleSheetStyle::qproperty_styleSheet()
+{
+ QWidget w;
+ auto checkBox = new QCheckBox("check", &w);
+ QString sheet = R"(QCheckBox { qproperty-styleSheet: "QCheckBox { qproperty-text: foobar; }"; })";
+
+ QVERIFY(w.property("styleSheet").toString().isEmpty());
+
+ w.setStyleSheet(sheet);
+ QCOMPARE(checkBox->text(), "check");
+
+ //recursion crash
+ w.ensurePolished();
+ QCOMPARE(w.property("styleSheet").toString(), sheet);
+ QCOMPARE(checkBox->text(), "foobar");
+}
+
namespace ns {
class PushButton1 : public QPushButton {
Q_OBJECT

View File

@ -1,25 +1,16 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:31 +0000
Subject: QPushButton/fusion style: don't ignore QIcon::On icon
Description: QPushButton/fusion style: don't ignore QIcon::On icon
The fusion style did ignore the QIcon::On icon because it reset
State_On to avoid the visual shift of a pressed button.
But it's not needed to reset this flag - the shift does not happen
because the fusion style does return 0 as offset for
PM_ButtonShiftHorizontal/PM_ButtonShiftVertical so no shifting will
happen.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=e9ccdf4d84157173
Last-Update: 2021-08-10
The fusion style did ignore the QIcon::On icon because it reset
State_On to avoid the visual shift of a pressed button.
But it's not needed to reset this flag - the shift does not happen
because the fusion style does return 0 as offset for
PM_ButtonShiftHorizontal/PM_ButtonShiftVertical so no shifting will
happen.
---
src/widgets/styles/qfusionstyle.cpp | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index f4345d9..962912c 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -1772,14 +1772,6 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
@@ -1772,14 +1772,6 @@ void QFusionStyle::drawControl(ControlEl
proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget);
}
break;

View File

@ -1,22 +1,13 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: use wayland platform plugin on GNOME wayland sessions by default
Description: use wayland platform plugin on GNOME wayland sessions by default
Qt wayland platform plugin has improved quite a lot and it is now pretty
much usable on Gnome. It also improves user experience a lot on HiDPI
displays.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=dda7dab8274991e4
Last-Update: 2022-10-16
Qt wayland platform plugin has improved quite a lot and it is now pretty
much usable on Gnome. It also improves user experience a lot on HiDPI
displays.
---
src/gui/kernel/qguiapplication.cpp | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 87643a3..8282bd3 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1412,14 +1412,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
@@ -1412,14 +1412,7 @@ void QGuiApplicationPrivate::createPlatf
if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) {
platformName = QByteArrayLiteral("xcb");
} else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) {

View File

@ -1,180 +0,0 @@
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: Initial GNU/kFreeBSD support
Last-Update: 2015-06-03
Forwarded: no
- add a gnukfreebsd-g++ qmake mkspec, mostly copied from the hurd-g++ one
- properly use LD_LIBRARY_PATH on GNU/* systems
---
mkspecs/features/qt_functions.prf | 2 +
mkspecs/gnukfreebsd-g++/qmake.conf | 54 +++++++++++++++++++++
mkspecs/gnukfreebsd-g++/qplatformdefs.h | 84 +++++++++++++++++++++++++++++++++
3 files changed, 140 insertions(+)
create mode 100644 mkspecs/gnukfreebsd-g++/qmake.conf
create mode 100644 mkspecs/gnukfreebsd-g++/qplatformdefs.h
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 7777e61..87f054a 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -215,6 +215,8 @@ defineTest(qtAddTargetEnv) {
deppath.name = PATH
} else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) {
deppath.name = LD_LIBRARY_PATH
+ } else:contains(QMAKE_HOST.os, ^GNU/.*) {
+ deppath.name = LD_LIBRARY_PATH
} else:contains(QMAKE_HOST.os, Haiku) {
deppath.name = LIBRARY_PATH
} else:equals(QMAKE_HOST.os, Darwin) {
diff --git a/mkspecs/gnukfreebsd-g++/qmake.conf b/mkspecs/gnukfreebsd-g++/qmake.conf
new file mode 100644
index 0000000..5637201
--- /dev/null
+++ b/mkspecs/gnukfreebsd-g++/qmake.conf
@@ -0,0 +1,54 @@
+#
+# qmake configuration for gnukfreebsd-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+QMAKE_PLATFORM += gnukfreebsd
+CONFIG += incremental
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CFLAGS_THREAD += -D_REENTRANT
+QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
+QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
+QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
+QMAKE_INCDIR_EGL =
+QMAKE_LIBDIR_EGL =
+QMAKE_INCDIR_OPENVG =
+QMAKE_LIBDIR_OPENVG =
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_EGL = -lEGL
+QMAKE_LIBS_OPENGL = -lGL
+QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
+QMAKE_LIBS_OPENVG = -lOpenVG
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_CFLAGS_XCB =
+QMAKE_LIBS_XCB =
+QMAKE_DEFINES_XCB =
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_NM = nm -P
+QMAKE_RANLIB =
+
+QMAKE_STRIP = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QMAKE_INSTALL_FILE = install -m 644 -p
+QMAKE_INSTALL_PROGRAM = install -m 755 -p
+
+include(../common/unix.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+load(qt_config)
diff --git a/mkspecs/gnukfreebsd-g++/qplatformdefs.h b/mkspecs/gnukfreebsd-g++/qplatformdefs.h
new file mode 100644
index 0000000..90aeac2
--- /dev/null
+++ b/mkspecs/gnukfreebsd-g++/qplatformdefs.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#include "../common/posix/qplatformdefs.h"
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H

View File

@ -1,21 +1,17 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: catch linker warnings in some config tests
Description: catch linker warnings in some config tests
Without this, qmake wrongly thinks that the tests succeed, for example:
.
./config.tests/unix/futimens/futimens.cpp:44: warning: futimens is not implemented and will always fail
test config.corelib.tests.futimens succeeded
Author: Dmitry Shachnev <mitya57@debian.org>
Forwarded: https://codereview.qt-project.org/163214 (rejected)
Bug: https://bugs.debian.org/827935
Last-Update: 2019-03-02
Without this, qmake wrongly thinks that the tests succeed, for example:
./config.tests/unix/futimens/futimens.cpp:44: warning: futimens is not implemented and will always fail
test config.corelib.tests.futimens succeeded
---
src/corelib/configure.json | 3 +++
src/corelib/configure.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index a9025a2..06f4311 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -331,6 +331,7 @@

View File

@ -1,25 +1,15 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: fix deletion order in QImageReader/Writer destructors
Description: fix deletion order in QImageReader/Writer destructors
The device would be deleted before the image format handler, and hence
be a dangling pointer that could easily cause a crash if the handler
or codec would access it on destruction, e.g. for cleanup.
Origin: upstream, commits
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f091026be1deb4b4
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=5633cb69f68ca3d3
Last-Update: 2023-02-26
The device would be deleted before the image format handler, and hence
be a dangling pointer that could easily cause a crash if the handler
or codec would access it on destruction, e.g. for cleanup.
---
src/gui/image/qimagereader.cpp | 6 +++---
src/gui/image/qimagewriter.cpp | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 5cb7e13..1274622 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -515,9 +515,9 @@ QImageReaderPrivate::QImageReaderPrivate(QImageReader *qq)
@@ -515,9 +515,9 @@ QImageReaderPrivate::QImageReaderPrivate
*/
QImageReaderPrivate::~QImageReaderPrivate()
{
@ -30,7 +20,7 @@ index 5cb7e13..1274622 100644
}
/*!
@@ -774,12 +774,12 @@ bool QImageReader::decideFormatFromContent() const
@@ -774,12 +774,12 @@ bool QImageReader::decideFormatFromConte
*/
void QImageReader::setDevice(QIODevice *device)
{
@ -45,11 +35,9 @@ index 5cb7e13..1274622 100644
d->text.clear();
}
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 33f5e49..a679f25 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -349,9 +349,9 @@ QImageWriter::QImageWriter(const QString &fileName, const QByteArray &format)
@@ -349,9 +349,9 @@ QImageWriter::QImageWriter(const QString
*/
QImageWriter::~QImageWriter()
{

View File

@ -1,15 +1,9 @@
From: Fathi Boudra <fabo@debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: build ibase sql plugin against firebird
Description: build ibase sql plugin against firebird
Author: Fathi Boudra <fabo@debian.org>
Author: Dmitry Shachnev <mitya57@debian.org>
Forwarded: no
Last-Update: 2017-06-30
---
src/plugins/sqldrivers/configure.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 28ccbea..9db93d6 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -52,7 +52,7 @@

View File

@ -1,23 +1,13 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:31 +0000
Subject: adjust QMimeDatabase implementation
Description: adjust QMimeDatabase implementation
When multiple globs match, and the result from magic sniffing is
unrelated to any of those globs, globs have priority and one of them
should be picked up.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=0cbbba2aa5b47224
Last-Update: 2021-06-12
When multiple globs match, and the result from magic sniffing is
unrelated to any of those globs, globs have priority and one of them
should be picked up.
---
src/corelib/mimetypes/qmimedatabase.cpp | 11 +++++++----
src/corelib/mimetypes/qmimeglobpattern.cpp | 5 ++++-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index 9de22ce..ff868a3 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -389,20 +389,23 @@ QMimeType QMimeDatabasePrivate::mimeTypeForFileNameAndData(const QString &fileNa
@@ -389,20 +389,23 @@ QMimeType QMimeDatabasePrivate::mimeType
// Disambiguate conflicting extensions (if magic matching found something)
if (candidateByData.isValid() && magicAccuracy > 0) {
const QString sniffedMime = candidateByData.name();
@ -45,11 +35,9 @@ index 9de22ce..ff868a3 100644
}
}
diff --git a/src/corelib/mimetypes/qmimeglobpattern.cpp b/src/corelib/mimetypes/qmimeglobpattern.cpp
index a81112d..3ab5bd4 100644
--- a/src/corelib/mimetypes/qmimeglobpattern.cpp
+++ b/src/corelib/mimetypes/qmimeglobpattern.cpp
@@ -83,7 +83,10 @@ void QMimeGlobMatchResult::addMatch(const QString &mimeType, int weight, const Q
@@ -83,7 +83,10 @@ void QMimeGlobMatchResult::addMatch(cons
}
if (!m_matchingMimeTypes.contains(mimeType)) {
m_matchingMimeTypes.append(mimeType);

View File

@ -1,89 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: treat the MYSQL_FIELD as read-only
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=549ee216fd5bf2b3
Last-Update: 2021-11-13
The MariaDB-connector-c version 3.2 and MariaDB server version 10.6
cooperate to avoid re-transferring the query metadata, so the fact that
we were modifying it was causing it to improperly decode the DATETIME
data types into string, as we had asked. We ended up with a 7-byte
string that was actually the date binary-encoded.
---
src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index 7ca055e..49a6ae5 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -223,7 +223,7 @@ public:
struct QMyField
{
char *outField = nullptr;
- MYSQL_FIELD *myField = nullptr;
+ const MYSQL_FIELD *myField = nullptr;
QMetaType::Type type = QMetaType::UnknownType;
my_bool nullIndicator = false;
ulong bufLength = 0ul;
@@ -361,11 +361,10 @@ static bool qIsInteger(int t)
void QMYSQLResultPrivate::bindBlobs()
{
int i;
- MYSQL_FIELD *fieldInfo;
MYSQL_BIND *bind;
for(i = 0; i < fields.count(); ++i) {
- fieldInfo = fields.at(i).myField;
+ const MYSQL_FIELD *fieldInfo = fields.at(i).myField;
if (qIsBlob(inBinds[i].buffer_type) && meta && fieldInfo) {
bind = &inBinds[i];
bind->buffer_length = fieldInfo->max_length;
@@ -392,35 +391,34 @@ bool QMYSQLResultPrivate::bindInValues()
inBinds = new MYSQL_BIND[fields.size()];
memset(inBinds, 0, fields.size() * sizeof(MYSQL_BIND));
- MYSQL_FIELD *fieldInfo;
+ const MYSQL_FIELD *fieldInfo;
while((fieldInfo = mysql_fetch_field(meta))) {
+ MYSQL_BIND *bind = &inBinds[i];
+
QMyField &f = fields[i];
f.myField = fieldInfo;
-
+ bind->buffer_length = f.bufLength = fieldInfo->length + 1;
+ bind->buffer_type = fieldInfo->type;
f.type = qDecodeMYSQLType(fieldInfo->type, fieldInfo->flags);
if (qIsBlob(fieldInfo->type)) {
// the size of a blob-field is available as soon as we call
// mysql_stmt_store_result()
// after mysql_stmt_exec() in QMYSQLResult::exec()
- fieldInfo->length = 0;
+ bind->buffer_length = f.bufLength = 0;
hasBlobs = true;
} else if (qIsInteger(f.type)) {
- fieldInfo->length = 8;
+ bind->buffer_length = f.bufLength = 8;
} else {
- fieldInfo->type = MYSQL_TYPE_STRING;
+ bind->buffer_type = MYSQL_TYPE_STRING;
}
- bind = &inBinds[i];
- field = new char[fieldInfo->length + 1];
- memset(field, 0, fieldInfo->length + 1);
- bind->buffer_type = fieldInfo->type;
- bind->buffer = field;
- bind->buffer_length = f.bufLength = fieldInfo->length + 1;
bind->is_null = &f.nullIndicator;
bind->length = &f.bufLength;
bind->is_unsigned = fieldInfo->flags & UNSIGNED_FLAG ? 1 : 0;
- f.outField=field;
+
+ char *field = new char[bind->buffer_length + 1]{};
+ bind->buffer = f.outField = field;
++i;
}

View File

@ -1,15 +1,8 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: disable htmlinfo example which contains non-free files
Description: disable htmlinfo example which contains non-free files
Author: Dmitry Shachnev <mitya57@debian.org>
Forwarded: not-needed
Last-Update: 2014-12-17
---
examples/xml/xml.pro | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/examples/xml/xml.pro b/examples/xml/xml.pro
index b075057..1c78e6b 100644
--- a/examples/xml/xml.pro
+++ b/examples/xml/xml.pro
@@ -1,6 +1,5 @@

View File

@ -1,37 +0,0 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: guard UTIME_NOW/UTIME_OMIT usages
Forwarded: no
Last-Update: 2018-02-22
---
qmake/library/ioutils.cpp | 2 +-
src/corelib/io/qfilesystemengine_unix.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp
index d217127..6fada00 100644
--- a/qmake/library/ioutils.cpp
+++ b/qmake/library/ioutils.cpp
@@ -228,7 +228,7 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
*errorString = fL1S("Cannot stat() reference file %1: %2.").arg(referenceFileName, fL1S(strerror(errno)));
return false;
}
-# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L
+# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L && defined(UTIME_NOW)
const struct timespec times[2] = { { 0, UTIME_NOW }, st.st_mtim };
const bool utimeError = utimensat(AT_FDCWD, targetFileName.toLocal8Bit().constData(), times, 0) < 0;
# else
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index f32bb52..58e06ee 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -1595,7 +1595,7 @@ bool QFileSystemEngine::setFileTime(int fd, const QDateTime &newDate, QAbstractF
return false;
}
-#if QT_CONFIG(futimens)
+#if QT_CONFIG(futimens) && defined(UTIME_OMIT)
struct timespec ts[2];
ts[0].tv_sec = ts[1].tv_sec = 0;

View File

@ -1,7 +1,4 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: upstream fixes to support OpenSSL 3.0
Description: upstream fixes to support OpenSSL 3.0
Origin: upstream, commits
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3186ca3e3972cf46
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=408656c6f9de326c
@ -9,15 +6,7 @@ Origin: upstream, commits
and a small part of
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=4c0f81490ba0c4ec
Last-Update: 2021-12-09
---
src/network/ssl/qsslcontext_openssl.cpp | 4 +-
.../ssl/qssldiffiehellmanparameters_openssl.cpp | 51 ----------------------
src/network/ssl/qsslsocket_openssl_symbols.cpp | 22 +++++++---
src/network/ssl/qsslsocket_openssl_symbols_p.h | 16 ++++---
4 files changed, 29 insertions(+), 64 deletions(-)
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index c9f202f..d0a428c 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -409,7 +409,7 @@ init_context:
@ -38,8 +27,6 @@ index c9f202f..d0a428c 100644
break;
case QSsl::TlsV1_3OrLater:
#ifdef TLS1_3_VERSION
diff --git a/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp b/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp
index aaf8741..b589353 100644
--- a/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp
+++ b/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp
@@ -59,57 +59,6 @@
@ -100,11 +87,9 @@ index aaf8741..b589353 100644
static bool isSafeDH(DH *dh)
{
int status = 0;
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index e53fb27..68a766c 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -148,7 +148,6 @@ DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
@@ -148,7 +148,6 @@ DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKE
DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
@ -112,7 +97,7 @@ index e53fb27..68a766c 100644
DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
@@ -371,7 +370,15 @@ DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr
@@ -371,7 +370,15 @@ DEFINEFUNC(const SSL_CIPHER *, SSL_get_c
DEFINEFUNC(int, SSL_version, const SSL *a, a, return 0, return)
DEFINEFUNC2(int, SSL_get_error, SSL *a, a, int b, b, return -1, return)
DEFINEFUNC(STACK_OF(X509) *, SSL_get_peer_cert_chain, SSL *a, a, return nullptr, return)
@ -128,7 +113,7 @@ index e53fb27..68a766c 100644
DEFINEFUNC(long, SSL_get_verify_result, const SSL *a, a, return -1, return)
DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return nullptr, return)
DEFINEFUNC(SSL_CTX *, SSL_get_SSL_CTX, SSL *a, a, return nullptr, return)
@@ -492,9 +499,7 @@ DEFINEFUNC(DH *, DH_new, DUMMYARG, DUMMYARG, return nullptr, return)
@@ -492,9 +499,7 @@ DEFINEFUNC(DH *, DH_new, DUMMYARG, DUMMY
DEFINEFUNC(void, DH_free, DH *dh, dh, return, DUMMYARG)
DEFINEFUNC3(DH *, d2i_DHparams, DH**a, a, const unsigned char **pp, pp, long length, length, return nullptr, return)
DEFINEFUNC2(int, i2d_DHparams, DH *a, a, unsigned char **p, p, return -1, return)
@ -172,11 +157,9 @@ index e53fb27..68a766c 100644
RESOLVEFUNC(BN_bin2bn)
#ifndef OPENSSL_NO_EC
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 95e8897..7196177 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -237,7 +237,6 @@ Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
@@ -237,7 +237,6 @@ Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(
EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
@ -184,7 +167,7 @@ index 95e8897..7196177 100644
int q_RSA_bits(RSA *a);
Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
@@ -510,7 +509,6 @@ const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
@@ -510,7 +509,6 @@ const SSL_CIPHER *q_SSL_get_current_ciph
int q_SSL_version(const SSL *a);
int q_SSL_get_error(SSL *a, int b);
STACK_OF(X509) *q_SSL_get_peer_cert_chain(SSL *a);
@ -203,7 +186,7 @@ index 95e8897..7196177 100644
BIGNUM *q_BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
#define q_SSL_CTX_set_tmp_dh(ctx, dh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_DH, 0, (char *)dh)
@@ -754,6 +749,17 @@ void q_CRYPTO_free(void *str, const char *file, int line);
@@ -754,6 +749,17 @@ void q_CRYPTO_free(void *str, const char
int q_SSL_CTX_get_security_level(const SSL_CTX *ctx);
void q_SSL_CTX_set_security_level(SSL_CTX *ctx, int level);

View File

@ -1,24 +1,11 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: update function argument of SSL_CTX_set_options
Description: update function argument of SSL_CTX_set_options
openssl3 uses uint64_t for the options argument in SSL_CTX_set_options,
older ones used long.
sizeof(long) is not the same on any platform as sizeof(uint64_t)
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=e995bfc0ea783c15
Backported for 5.15 by the patch author, Michael Saxl.
Last-Update: 2022-08-07
openssl3 uses uint64_t for the options argument in SSL_CTX_set_options,
older ones used long.
sizeof(long) is not the same on any platform as sizeof(uint64_t)
---
src/network/ssl/qsslcontext_openssl.cpp | 2 +-
src/network/ssl/qsslsocket_openssl.cpp | 4 ++--
src/network/ssl/qsslsocket_openssl_p.h | 8 +++++++-
src/network/ssl/qsslsocket_openssl_symbols.cpp | 2 +-
src/network/ssl/qsslsocket_openssl_symbols_p.h | 2 +-
5 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index d0a428c..c992da9 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -455,7 +455,7 @@ init_context:
@ -30,11 +17,9 @@ index d0a428c..c992da9 100644
q_SSL_CTX_set_options(sslContext->ctx, options);
// Tell OpenSSL to release memory early
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 37fad2a..8f6858c 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -550,9 +550,9 @@ static void q_loadCiphersForConnection(SSL *connection, QList<QSslCipher> &ciphe
@@ -550,9 +550,9 @@ static void q_loadCiphersForConnection(S
// Defined in qsslsocket.cpp
void q_setDefaultDtlsCiphers(const QList<QSslCipher> &ciphers);
@ -46,8 +31,6 @@ index 37fad2a..8f6858c 100644
if (protocol == QSsl::TlsV1SslV3)
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3;
else if (protocol == QSsl::SecureProtocols)
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index 4103de2..5547589 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -107,6 +107,12 @@
@ -72,11 +55,9 @@ index 4103de2..5547589 100644
static QSslCipher QSslCipher_from_SSL_CIPHER(const SSL_CIPHER *cipher);
static QList<QSslCertificate> STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509);
static QList<QSslError> verify(const QList<QSslCertificate> &certificateChain, const QString &hostName);
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 68a766c..459ccd0 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -157,7 +157,7 @@ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMM
@@ -157,7 +157,7 @@ DEFINEFUNC2(void, OPENSSL_sk_push, OPENS
DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
@ -85,11 +66,9 @@ index 68a766c..459ccd0 100644
DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
#ifdef TLS1_3_VERSION
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 7196177..27aeffa 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -245,7 +245,7 @@ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
@@ -245,7 +245,7 @@ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push
Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
int q_SSL_session_reused(SSL *a);

View File

@ -1,21 +1,13 @@
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: Avoid unconditional PATH_MAX usage
Author: Pino Toscano <toscano.pino@tiscali.it>
Description: Avoid unconditional PATH_MAX usage
Use a "safe" size in case PATH_MAX is not defined; in the end, this should not
be used, as a allocating realpath() will be used instead.
Forwarded: no
Last-Update: 2020-04-19
Use a "safe" size in case PATH_MAX is not defined; in the end, this should not
be used, as a allocating realpath() will be used instead.
---
src/corelib/io/qfilesystemengine_unix.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 58e06ee..b0e123a 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -689,7 +689,11 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
@@ -689,7 +689,11 @@ QFileSystemEntry QFileSystemEngine::cano
Q_UNUSED(data);
return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
#else

View File

@ -1,16 +1,13 @@
From: Martin Smith <martin.smith@qt.io>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: pass default include directories to qdoc
Description: pass default include directories to qdoc
Author: Martin Smith <martin.smith@qt.io>
Bug: https://bugs.debian.org/908328
Forwarded: no
Last-Update: 2020-01-28
---
mkspecs/features/qt_docs.prf | 4 ++++
mkspecs/features/qt_docs.prf | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
index e19d06f..05cdb11 100644
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
@@ -98,6 +98,10 @@ doc_command = $$QDOC $$QMAKE_DOCS

View File

@ -1,22 +1,12 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: widgets: setTransientParent() when a QMenu is a window
Description: widgets: setTransientParent() when a QMenu is a window
On some platforms, such as X11 and Wayland with some compositors,
QMenu could be a popup window, which should be set a transient parent
to get relative position, which is requested by Wayland.
.
Added transientParentWindow() for QMenuPrivate like QDialogPrivate.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=493a85a9e4688744
Last-Update: 2022-10-16
On some platforms, such as X11 and Wayland with some compositors,
QMenu could be a popup window, which should be set a transient parent
to get relative position, which is requested by Wayland.
Added transientParentWindow() for QMenuPrivate like QDialogPrivate.
---
src/widgets/widgets/qmenu.cpp | 25 +++++++++++++++++++++++++
src/widgets/widgets/qmenu_p.h | 1 +
2 files changed, 26 insertions(+)
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index a23d8b7..2809beb 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -624,6 +624,29 @@ void QMenuPrivate::hideMenu(QMenu *menu)
@ -58,8 +48,6 @@ index a23d8b7..2809beb 100644
break;
#ifndef QT_NO_TOOLTIP
case QEvent::ToolTip:
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index 3871d67..fa3929e 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -440,6 +440,7 @@ public:

View File

@ -0,0 +1,25 @@
Description: do not set Qt::ToolTip flag for QShapedPixmapWindow
This hint is not really needed in the first place and only causes
problems in some environments.
.
For example in KDE, the compositor animates changes in position and size
for all ToolTip windows. However, this is not wanted here because we use
this window as a thumbnail for a drag-and-drop operation.
Before this patch the dragged element would lag significantly behind the
cursor. Now it works as expected, i.e. the dragged element follows the
cursor immediately.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=180b496b537089b8
Bug: https://bugreports.qt.io/browse/QTBUG-98048
Last-Update: 2023-05-20
--- a/src/gui/kernel/qshapedpixmapdndwindow.cpp
+++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp
@@ -56,7 +56,7 @@ QShapedPixmapWindow::QShapedPixmapWindow
QSurfaceFormat format;
format.setAlphaBufferSize(8);
setFormat(format);
- setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint
+ setFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint
| Qt::WindowTransparentForInput | Qt::WindowDoesNotAcceptFocus);
}

View File

@ -1,24 +1,16 @@
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Fri, 5 May 2023 07:44:34 +0000
Subject: Limit Linux-only code with Q_OS_LINUX
Author: Pino Toscano <toscano.pino@tiscali.it>
Description: Limit Linux-only code with Q_OS_LINUX
The QStorageInfo/QStorageIterator implementation used for Linux is used also
on Hurd, as it uses an interface provided by GNU libc.
QStorageIterator::device() tries to use PATH_MAX (unavailable on the Hurd)
to lookup a /dev/block/ path, which exists on Linux only; hence, perform that
check within a Q_OS_LINUX block.
Forwarded: no
Last-Update: 2020-04-19
The QStorageInfo/QStorageIterator implementation used for Linux is used also
on Hurd, as it uses an interface provided by GNU libc.
QStorageIterator::device() tries to use PATH_MAX (unavailable on the Hurd)
to lookup a /dev/block/ path, which exists on Linux only; hence, perform that
check within a Q_OS_LINUX block.
---
src/corelib/io/qstorageinfo_unix.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index 698c4dd..45570ee 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -566,6 +566,7 @@ inline QByteArray QStorageIterator::fileSystemType() const
@@ -566,6 +566,7 @@ inline QByteArray QStorageIterator::file
inline QByteArray QStorageIterator::device() const
{
@ -26,7 +18,7 @@ index 698c4dd..45570ee 100644
// check that the device exists
if (mnt.mnt_fsname[0] == '/' && access(mnt.mnt_fsname, F_OK) != 0) {
// It doesn't, so let's try to resolve the dev_t from /dev/block.
@@ -581,6 +582,7 @@ inline QByteArray QStorageIterator::device() const
@@ -581,6 +582,7 @@ inline QByteArray QStorageIterator::devi
return dev;
}
}

View File

@ -1,30 +1,21 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: set geometry property in QXcbWindow after checking minimum size
Description: set geometry property in QXcbWindow after checking minimum size
QXcbWindow::create() bound the window's size to windowMinimumSize(),
after its size had been inherited from parent().
QPlatformWindow::setGeometry() was called before that sanity check.
.
When a fullscreen window is re-mapped from a deactivated screen to the
remaining screen, the call to QPlatformWindow::setGeometry() assigns
an invalid QRect to QPlatformWindowPrivate::rect
The negative int values x2 and/or y2 cause
QXcbBackingStoreImage::flushPixmap to address unmapped memory and
crash.
.
This patch moves the call to QPlatformWindow::setGeometry() from
before to after bounding to a minimum value. That assures a valid
rectangle to be assigned in all cases.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6a3627b6c5aa5109
Last-Update: 2023-01-04
QXcbWindow::create() bound the window's size to windowMinimumSize(),
after its size had been inherited from parent().
QPlatformWindow::setGeometry() was called before that sanity check.
When a fullscreen window is re-mapped from a deactivated screen to the
remaining screen, the call to QPlatformWindow::setGeometry() assigns
an invalid QRect to QPlatformWindowPrivate::rect
The negative int values x2 and/or y2 cause
QXcbBackingStoreImage::flushPixmap to address unmapped memory and
crash.
This patch moves the call to QPlatformWindow::setGeometry() from
before to after bounding to a minimum value. That assures a valid
rectangle to be assigned in all cases.
---
src/plugins/platforms/xcb/qxcbwindow.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 609e8ac..abcdce0 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -299,11 +299,6 @@ void QXcbWindow::create()

View File

@ -1,100 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: xcb: recreate xcb window under some conditions
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f9e4402ffeef791e
Last-Update: 2022-11-24
Some netWmState needs to be set during unmap/hide(), which is too
difficult to follow, and causes m_mapped status out of sync very easily
sometimes, which we had tried in
e946e6895a8517a887ac246905e0769edd766fcc .
Destroy the xcb window and recreate new could make the thing
much easier. This practice is also used in other platforms, such
as cocoa plugin.
In Qt 4, the platform window was destroyed and re-created in this
situation on all platforms, which was not ported into Qt5.
See also the code between setWinId(0) and createWinId() in
QWidgetPrivate::setParent_sys() in qwidget_x11.cpp/qwidget_win.cpp/
qwidget_mac.mm.
---
src/plugins/platforms/xcb/qxcbwindow.cpp | 14 ++++++++++++++
src/plugins/platforms/xcb/qxcbwindow.h | 9 +++++++++
2 files changed, 23 insertions(+)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 1c947f3..609e8ac 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -93,6 +93,8 @@ enum {
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcQpaWindow, "qt.qpa.window");
+
Q_DECLARE_TYPEINFO(xcb_rectangle_t, Q_PRIMITIVE_TYPE);
#undef FocusIn
@@ -555,6 +557,7 @@ void QXcbWindow::destroy()
}
m_mapped = false;
+ m_recreationReasons = RecreationNotNeeded;
if (m_pendingSyncRequest)
m_pendingSyncRequest->invalidate();
@@ -689,6 +692,11 @@ void QXcbWindow::setVisible(bool visible)
void QXcbWindow::show()
{
if (window()->isTopLevel()) {
+ if (m_recreationReasons != RecreationNotNeeded) {
+ qCDebug(lcQpaWindow) << "QXcbWindow: need to recreate window" << window() << m_recreationReasons;
+ create();
+ m_recreationReasons = RecreationNotNeeded;
+ }
// update WM_NORMAL_HINTS
propagateSizeHints();
@@ -904,6 +912,12 @@ void QXcbWindow::setWindowFlags(Qt::WindowFlags flags)
if (type == Qt::Popup)
flags |= Qt::X11BypassWindowManagerHint;
+ Qt::WindowFlags oldflags = window()->flags();
+ if ((oldflags & Qt::WindowStaysOnTopHint) != (flags & Qt::WindowStaysOnTopHint))
+ m_recreationReasons |= WindowStaysOnTopHintChanged;
+ if ((oldflags & Qt::WindowStaysOnBottomHint) != (flags & Qt::WindowStaysOnBottomHint))
+ m_recreationReasons |= WindowStaysOnBottomHintChanged;
+
const quint32 mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
const quint32 values[] = {
// XCB_CW_OVERRIDE_REDIRECT
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 6f5c1f5..8de486c 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -74,6 +74,13 @@ public:
Q_DECLARE_FLAGS(NetWmStates, NetWmState)
+ enum RecreationReason {
+ RecreationNotNeeded = 0,
+ WindowStaysOnTopHintChanged = 0x1,
+ WindowStaysOnBottomHintChanged = 0x2
+ };
+ Q_DECLARE_FLAGS(RecreationReasons, RecreationReason)
+
QXcbWindow(QWindow *window);
~QXcbWindow();
@@ -281,6 +288,8 @@ protected:
int m_swapInterval = -1;
qreal m_sizeHintsScaleFactor = 1.0;
+
+ RecreationReasons m_recreationReasons = RecreationNotNeeded;
};
class QXcbForeignWindow : public QXcbWindow

View File

@ -1,20 +1,15 @@
From: =?utf-8?q?Lisandro_Dami=C3=A1n_Nicanor_P=C3=A9rez_Meyer?=
<lisandro@debian.org>
Date: Fri, 5 May 2023 07:44:33 +0000
Subject: remove non-used privacy-breach code
Description: remove non-used privacy-breach code
This code makes Lintian unhappy. But we are really not using it, it only
gets inserted when building the online doc.
Anyways the best way to calm down Lintian is to simply remove it.
Author: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Forwarded: not-needed
Last-Update: 2015-02-18
This code makes Lintian unhappy. But we are really not using it, it only
gets inserted when building the online doc.
Anyways the best way to calm down Lintian is to simply remove it.
---
doc/global/template/scripts/main.js | 5 -----
doc/global/template/scripts/main.js | 5 -----
1 file changed, 5 deletions(-)
diff --git a/doc/global/template/scripts/main.js b/doc/global/template/scripts/main.js
index 823cebe..7d99e00 100644
--- a/doc/global/template/scripts/main.js
+++ b/doc/global/template/scripts/main.js
@@ -94,11 +94,6 @@ $(document).ready(function($) {

View File

@ -1,23 +1,13 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:34 +0000
Subject: revert "Remove the dead code for blocking methods from QtConcurrent"
Description: revert "Remove the dead code for blocking methods from QtConcurrent"
It's a binary incompatible change.
Origin: KDE, https://invent.kde.org/qt/qt/qtbase/-/commit/eeadc036d77b75be
Also submitted to upstream 5.15 branch according to
https://lists.qt-project.org/pipermail/development/2022-September/042951.html.
Last-Update: 2022-09-10
It's a binary incompatible change.
---
src/concurrent/qtconcurrentthreadengine.cpp | 33 +++++++++++++++++++++++++++++
src/concurrent/qtconcurrentthreadengine.h | 23 ++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/src/concurrent/qtconcurrentthreadengine.cpp b/src/concurrent/qtconcurrentthreadengine.cpp
index ea6ce3a..7f91a2b 100644
--- a/src/concurrent/qtconcurrentthreadengine.cpp
+++ b/src/concurrent/qtconcurrentthreadengine.cpp
@@ -176,6 +176,39 @@ void ThreadEngineBase::startSingleThreaded()
@@ -176,6 +176,39 @@ void ThreadEngineBase::startSingleThread
finish();
}
@ -57,8 +47,6 @@ index ea6ce3a..7f91a2b 100644
void ThreadEngineBase::startThread()
{
startThreadInternal();
diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h
index 7c30ceb..a4c8548 100644
--- a/src/concurrent/qtconcurrentthreadengine.h
+++ b/src/concurrent/qtconcurrentthreadengine.h
@@ -91,6 +91,7 @@ public:
@ -69,11 +57,10 @@ index 7c30ceb..a4c8548 100644
void startThread();
bool isCanceled();
void waitForResume();
@@ -143,6 +144,15 @@ public:
return result();
@@ -144,6 +145,15 @@ public:
}
+ // Runs the user algorithm using multiple threads.
// Runs the user algorithm using multiple threads.
+ // This function blocks until the algorithm is finished,
+ // and then returns the result.
+ T *startBlocking()
@ -82,10 +69,11 @@ index 7c30ceb..a4c8548 100644
+ return result();
+ }
+
// Runs the user algorithm using multiple threads.
+ // Runs the user algorithm using multiple threads.
// Does not block, returns a future.
QFuture<T> startAsynchronously()
@@ -223,6 +233,13 @@ class ThreadEngineStarter : public ThreadEngineStarterBase<T>
{
@@ -223,6 +233,13 @@ class ThreadEngineStarter : public Threa
public:
ThreadEngineStarter(TypedThreadEngine *eng)
: Base(eng) { }
@ -99,7 +87,7 @@ index 7c30ceb..a4c8548 100644
};
// Full template specialization where T is void.
@@ -232,6 +249,12 @@ class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void>
@@ -232,6 +249,12 @@ class ThreadEngineStarter<void> : public
public:
ThreadEngineStarter(ThreadEngine<void> *_threadEngine)
: ThreadEngineStarterBase<void>(_threadEngine) {}

View File

@ -1,257 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Fri, 5 May 2023 07:44:32 +0000
Subject: revert "xcb: implement missing bits from ICCCM 4.1.4 WM_STATE
handling"
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=d27a6235246764be
Last-Update: 2023-01-04
This reverts commit e946e6895a8517a887ac246905e0769edd766fcc.
It clears the duplicate show() and hide() too aggressive in
handleDeferredTasks() and can cause visible states out of sync between
qt and system(x11) when user switches visible on and off very
frequently.
This change also reverts 28138aa80a14279a72af2818f5bbbaa670283964.
---
src/plugins/platforms/xcb/qxcbwindow.cpp | 115 ++++---------------------------
src/plugins/platforms/xcb/qxcbwindow.h | 16 -----
2 files changed, 12 insertions(+), 119 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index ffda7b6..1c947f3 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -564,11 +564,6 @@ void QXcbWindow::setGeometry(const QRect &rect)
{
QPlatformWindow::setGeometry(rect);
- if (shouldDeferTask(Task::SetGeometry)) {
- m_deferredGeometry = rect;
- return;
- }
-
propagateSizeHints();
QXcbScreen *currentScreen = xcbScreen();
@@ -693,9 +688,6 @@ void QXcbWindow::setVisible(bool visible)
void QXcbWindow::show()
{
- if (shouldDeferTask(Task::Map))
- return;
-
if (window()->isTopLevel()) {
// update WM_NORMAL_HINTS
@@ -746,10 +738,6 @@ void QXcbWindow::show()
void QXcbWindow::hide()
{
- if (shouldDeferTask(Task::Unmap))
- return;
-
- m_wmStateValid = false;
xcb_unmap_window(xcb_connection(), m_window);
// send synthetic UnmapNotify event according to icccm 4.1.4
@@ -909,9 +897,6 @@ QXcbWindow::NetWmStates QXcbWindow::netWmStates()
void QXcbWindow::setWindowFlags(Qt::WindowFlags flags)
{
- if (shouldDeferTask(Task::SetWindowFlags))
- return;
-
Qt::WindowType type = static_cast<Qt::WindowType>(int(flags & Qt::WindowType_Mask));
if (type == Qt::ToolTip)
@@ -941,8 +926,6 @@ void QXcbWindow::setWindowFlags(Qt::WindowFlags flags)
setTransparentForMouseEvents(flags & Qt::WindowTransparentForInput);
updateDoesNotAcceptFocus(flags & Qt::WindowDoesNotAcceptFocus);
-
- m_isWmManagedWindow = !(flags & Qt::X11BypassWindowManagerHint);
}
void QXcbWindow::setMotifWmHints(Qt::WindowFlags flags)
@@ -1142,9 +1125,6 @@ void QXcbWindow::setWindowState(Qt::WindowStates state)
if (state == m_windowState)
return;
- if (shouldDeferTask(Task::SetWindowState))
- return;
-
// unset old state
if (m_windowState & Qt::WindowMinimized)
xcb_map_window(xcb_connection(), m_window);
@@ -1894,10 +1874,6 @@ void QXcbWindow::handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event)
if (event->window == m_window) {
m_mapped = false;
QWindowSystemInterface::handleExposeEvent(window(), QRegion());
- if (!m_isWmManagedWindow || parent()) {
- m_wmStateValid = true;
- handleDeferredTasks();
- }
}
}
@@ -2212,98 +2188,30 @@ void QXcbWindow::handleLeaveNotifyEvent(const xcb_leave_notify_event_t *event)
handleLeaveNotifyEvent(event->root_x, event->root_y, event->mode, event->detail, event->time);
}
-bool QXcbWindow::shouldDeferTask(Task task)
-{
- if (m_wmStateValid)
- return false;
-
- m_deferredTasks.append(task);
- return true;
-}
-
-void QXcbWindow::handleDeferredTasks()
-{
- Q_ASSERT(m_wmStateValid == true);
- if (m_deferredTasks.isEmpty())
- return;
-
- bool map = false;
- bool unmap = false;
-
- QVector<Task> tasks;
- for (auto taskIt = m_deferredTasks.rbegin(); taskIt != m_deferredTasks.rend(); ++taskIt) {
- if (!tasks.contains(*taskIt))
- tasks.prepend(*taskIt);
- }
-
- for (Task task : tasks) {
- switch (task) {
- case Task::Map:
- map = true;
- unmap = false;
- break;
- case Task::Unmap:
- unmap = true;
- map = false;
- break;
- case Task::SetGeometry:
- setGeometry(m_deferredGeometry);
- break;
- case Task::SetWindowFlags:
- setWindowFlags(window()->flags());
- break;
- case Task::SetWindowState:
- setWindowState(window()->windowState());
- break;
- }
- }
- m_deferredTasks.clear();
-
- if (map) {
- Q_ASSERT(unmap == false);
- show();
- }
- if (unmap) {
- Q_ASSERT(map == false);
- hide();
- }
-}
-
void QXcbWindow::handlePropertyNotifyEvent(const xcb_property_notify_event_t *event)
{
connection()->setTime(event->time);
- const bool wmStateChanged = event->atom == atom(QXcbAtom::WM_STATE);
- const bool netWmStateChanged = event->atom == atom(QXcbAtom::_NET_WM_STATE);
- if (netWmStateChanged || wmStateChanged) {
- if (wmStateChanged && !m_wmStateValid && m_isWmManagedWindow) {
- // ICCCM 4.1.4
- // Clients that want to re-use a client window (e.g. by mapping it again)
- // after withdrawing it must wait for the withdrawal to be complete before
- // proceeding. The preferred method for doing this is for clients to wait for
- // a window manager to update or remove the WM_STATE property.
- m_wmStateValid = true;
- handleDeferredTasks();
- }
- if (event->state == XCB_PROPERTY_DELETE)
+ const bool propertyDeleted = event->state == XCB_PROPERTY_DELETE;
+
+ if (event->atom == atom(QXcbAtom::_NET_WM_STATE) || event->atom == atom(QXcbAtom::WM_STATE)) {
+ if (propertyDeleted)
return;
- if (wmStateChanged) {
+ Qt::WindowStates newState = Qt::WindowNoState;
+
+ if (event->atom == atom(QXcbAtom::WM_STATE)) { // WM_STATE: Quick check for 'Minimize'.
auto reply = Q_XCB_REPLY(xcb_get_property, xcb_connection(),
0, m_window, atom(QXcbAtom::WM_STATE),
XCB_ATOM_ANY, 0, 1024);
if (reply && reply->format == 32 && reply->type == atom(QXcbAtom::WM_STATE)) {
- auto data = static_cast<const quint32 *>(xcb_get_property_value(reply.get()));
- if (reply->length != 0) {
- const bool changedToWithdrawn = data[0] == XCB_ICCCM_WM_STATE_WITHDRAWN;
- const bool changedToIconic = data[0] == XCB_ICCCM_WM_STATE_ICONIC;
- m_minimized = changedToIconic || (changedToWithdrawn && m_minimized);
- }
+ const quint32 *data = (const quint32 *)xcb_get_property_value(reply.get());
+ if (reply->length != 0)
+ m_minimized = (data[0] == XCB_ICCCM_WM_STATE_ICONIC
+ || (data[0] == XCB_ICCCM_WM_STATE_WITHDRAWN && m_minimized));
}
}
- // _NET_WM_STATE handling
- Qt::WindowStates newState = Qt::WindowNoState;
const NetWmStates states = netWmStates();
// _NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate that a window would
// not be visible on the screen if its desktop/viewport were active and its coordinates were
@@ -2325,6 +2233,7 @@ void QXcbWindow::handlePropertyNotifyEvent(const xcb_property_notify_event_t *ev
if ((m_windowState & Qt::WindowMinimized) && connection()->mouseGrabber() == this)
connection()->setMouseGrabber(nullptr);
}
+ return;
} else if (event->atom == atom(QXcbAtom::_NET_FRAME_EXTENTS)) {
m_dirtyFrameMargins = true;
}
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 55af927..6f5c1f5 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -74,14 +74,6 @@ public:
Q_DECLARE_FLAGS(NetWmStates, NetWmState)
- enum Task {
- Map,
- Unmap,
- SetGeometry,
- SetWindowFlags,
- SetWindowState
- };
-
QXcbWindow(QWindow *window);
~QXcbWindow();
@@ -151,9 +143,6 @@ public:
QXcbWindow *toWindow() override;
- bool shouldDeferTask(Task task);
- void handleDeferredTasks();
-
void handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global,
Qt::KeyboardModifiers modifiers, QEvent::Type type, Qt::MouseEventSource source);
@@ -292,11 +281,6 @@ protected:
int m_swapInterval = -1;
qreal m_sizeHintsScaleFactor = 1.0;
-
- bool m_wmStateValid = true;
- QVector<Task> m_deferredTasks;
- bool m_isWmManagedWindow = true;
- QRect m_deferredGeometry;
};
class QXcbForeignWindow : public QXcbWindow

31
debian/patches/series vendored
View File

@ -1,37 +1,36 @@
# Backported from upstream.
mime_globs.diff
fusion_checkable_qpushbutton.diff
fix_recursion_crash.diff
mysql_field_readonly.diff
openssl3.diff
CVE-2022-25255.diff
openssl_set_options.diff
qmenu_set_transient_parent.diff
gnome_wayland.diff
revert_wm_state.diff
recreate_xcb_window.diff
fix_alt_backtick.diff
image_deletion_order.diff
qxcbwindow_set_geometry.diff
CVE-2023-24607.diff
gnukfreebsd.diff
qshapedpixmapwindow_no_tooltip.diff
CVE-2023-32763.diff
CVE-2023-32762.diff
CVE-2023-33285.diff
CVE-2023-34410.diff
sql_odbc_more_unicode_checks.diff
sql_odbc_fix_unicode_check.diff
a11y_root.diff
dont_use_O_PATH.diff
fix_qdbusmacros_h.diff
CVE-2023-37369.diff
CVE-2023-38197.diff
# Debian specific.
no_htmlinfo_example.diff
remove_privacy_breaches.diff
link_fbclient.diff
gnukfreebsd_linker_warnings.diff
armv4.diff
nonlinux_utime.diff
qdoc_default_incdirs.diff
path_max.diff
qstorageinfo_linux.diff
cross_build_mysql.diff
cast_types_for_egl_x11_test.diff
revert_startBlocking_removal.diff
0029-3-try-rebuild.patch
0030-5-2.patch
0031-10-changelog.patch
0032-13-rebuild.patch
0033-update-debian-changelog.patch
0034-update-debian-changelog.patch
0035-update-debian-changelog.patch
0036-update-debian-changelog-to-5.15.8-dfsg-ok2.2.patch
0037-bugfix-I79FD0-wayland.patch

View File

@ -0,0 +1,32 @@
Description: QSQL/ODBC: fix regression (trailing NUL)
When we fixed the callers of toSQLTCHAR() to use the result's size()
instead of the input's (which differ, if sizeof(SQLTCHAR) != 2), we
exposed callers to the append(0), which changes the size() of the
result QVLA. Callers that don't rely on NUL-termination (all?) now saw
an additional training NUL.
.
Fix by not NUL-terminating, and changing the only user of SQL_NTS to
use an explicit length.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9020034b3b6a3a81
Last-Update: 2023-06-30
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
@@ -125,7 +125,6 @@ inline static QVarLengthArray<SQLTCHAR>
{
QVarLengthArray<SQLTCHAR> result;
toSQLTCHARImpl(result, input);
- result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
return result;
}
@@ -2119,7 +2118,8 @@ void QODBCDriverPrivate::checkUnicode()
QLatin1String("select 'test' from dual"),
};
for (const auto &statement : statements) {
- r = SQLExecDirect(hStmt, toSQLTCHAR(statement).data(), SQL_NTS);
+ auto encoded = toSQLTCHAR(statement);
+ r = SQLExecDirect(hStmt, encoded.data(), SQLINTEGER(encoded.size()));
if (r == SQL_SUCCESS)
break;
}

View File

@ -0,0 +1,35 @@
Description: SQL/ODBC: add another check to detect unicode availability in driver
Since ODBC does not have a direct way finding out if unicode is
supported by the underlying driver the ODBC plugin does some checks. As
a last resort a sql statement is executed which returns a string. But
even this may fail because the select statement has no FROM part which
is rejected by at least Oracle does not allow. Therefore add another
query which is correct for Oracle & DB2 as a workaround. The question
why the first three statements to check for unicode availability fail
is still open but can't be checked since I've no access to an oracle
database.
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f19320748d282b1e
Last-Update: 2023-06-30
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
@@ -2111,7 +2111,18 @@ void QODBCDriverPrivate::checkUnicode()
hDbc,
&hStmt);
- r = SQLExecDirect(hStmt, toSQLTCHAR(QLatin1String("select 'test'")).data(), SQL_NTS);
+ // for databases which do not return something useful in SQLGetInfo and are picky about a
+ // 'SELECT' statement without 'FROM' but support VALUE(foo) statement like e.g. DB2 or Oracle
+ const auto statements = {
+ QLatin1String("select 'test'"),
+ QLatin1String("values('test')"),
+ QLatin1String("select 'test' from dual"),
+ };
+ for (const auto &statement : statements) {
+ r = SQLExecDirect(hStmt, toSQLTCHAR(statement).data(), SQL_NTS);
+ if (r == SQL_SUCCESS)
+ break;
+ }
if(r == SQL_SUCCESS) {
r = SQLFetch(hStmt);
if(r == SQL_SUCCESS) {

View File

@ -344,8 +344,6 @@ usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/freebsd-clang/qmake.conf
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/freebsd-clang/qplatformdefs.h
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/freebsd-g++/qmake.conf
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/freebsd-g++/qplatformdefs.h
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/gnukfreebsd-g++/qmake.conf
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/gnukfreebsd-g++/qplatformdefs.h
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/haiku-g++/qmake.conf
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/haiku-g++/qplatformdefs.h
usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/hpuxi-g++-64/qmake.conf

View File

@ -1,29 +1,29 @@
#! /usr/bin/dh-exec
[!armel !armhf] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QXcbGlxIntegrationPlugin.cmake
[!armel !armhf] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_glx_support_private.pri
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFsKmsSupport/Qt5EglFsKmsSupportConfig.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFsKmsSupport/Qt5EglFsKmsSupportConfigVersion.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSEmulatorIntegrationPlugin.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSIntegrationPlugin.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsEglDeviceIntegrationPlugin.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsGbmIntegrationPlugin.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSX11IntegrationPlugin.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFSDeviceIntegration.prl
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFSDeviceIntegration.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFsKmsSupport.prl
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFsKmsSupport.so
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_kms_support_private.pri
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFsKmsSupport/Qt5EglFsKmsSupportConfig.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFsKmsSupport/Qt5EglFsKmsSupportConfigVersion.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSEmulatorIntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSIntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsEglDeviceIntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsGbmIntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEglFSX11IntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEvdevKeyboardPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEvdevMousePlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEvdevTabletPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QEvdevTouchScreenPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QLibInputPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QLinuxFbIntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Network/Qt5Network_QConnmanEnginePlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5Network/Qt5Network_QNetworkManagerEnginePlugin.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFSDeviceIntegration.prl
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFSDeviceIntegration.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFsKmsSupport.prl
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5EglFsKmsSupport.so
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_kms_support_private.pri
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri
usr/include/${DEB_HOST_MULTIARCH}/qt5/QtConcurrent/QtConcurrent
usr/include/${DEB_HOST_MULTIARCH}/qt5/QtConcurrent/QtConcurrentDepends

View File

@ -8,29 +8,29 @@
[!armel !armhf] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5GlxSupport/Qt5GlxSupportConfigVersion.cmake
[!armel !armhf] usr/lib/${DEB_HOST_MULTIARCH}/libQt5GlxSupport.a
[!armel !armhf] usr/lib/${DEB_HOST_MULTIARCH}/libQt5GlxSupport.prl
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/5.*/*
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/QtEglFSDeviceIntegration
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/QtEglFSDeviceIntegrationDepends
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/QtEglFSDeviceIntegrationVersion
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/qteglfsdeviceintegrationversion.h
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/5.*/*
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/QtKmsSupport
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/QtKmsSupportDepends
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/QtKmsSupportVersion
[kfreebsd-any linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/qtkmssupportversion.h
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFSDeviceIntegration/Qt5EglFSDeviceIntegrationConfig.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFSDeviceIntegration/Qt5EglFSDeviceIntegrationConfigVersion.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5KmsSupport/Qt5KmsSupportConfig.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5KmsSupport/Qt5KmsSupportConfigVersion.cmake
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5KmsSupport.a
[kfreebsd-any linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5KmsSupport.prl
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/5.*/*
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/QtEglFSDeviceIntegration
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/QtEglFSDeviceIntegrationDepends
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/QtEglFSDeviceIntegrationVersion
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtEglFSDeviceIntegration/qteglfsdeviceintegrationversion.h
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/5.*/*
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/QtKmsSupport
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/QtKmsSupportDepends
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/QtKmsSupportVersion
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtKmsSupport/qtkmssupportversion.h
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtVulkanSupport/5.*/*
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtVulkanSupport/QtVulkanSupport
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtVulkanSupport/QtVulkanSupportDepends
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtVulkanSupport/QtVulkanSupportVersion
[linux-any] usr/include/${DEB_HOST_MULTIARCH}/qt5/QtVulkanSupport/qtvulkansupportversion.h
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFSDeviceIntegration/Qt5EglFSDeviceIntegrationConfig.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5EglFSDeviceIntegration/Qt5EglFSDeviceIntegrationConfigVersion.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5KmsSupport/Qt5KmsSupportConfig.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5KmsSupport/Qt5KmsSupportConfigVersion.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5VulkanSupport/Qt5VulkanSupportConfig.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt5VulkanSupport/Qt5VulkanSupportConfigVersion.cmake
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5KmsSupport.a
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5KmsSupport.prl
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5VulkanSupport.a
[linux-any] usr/lib/${DEB_HOST_MULTIARCH}/libQt5VulkanSupport.prl
usr/include/${DEB_HOST_MULTIARCH}/qt5/QtAccessibilitySupport/5.*/*

3
debian/rules vendored
View File

@ -37,7 +37,7 @@ else
extra_configure_opts += -opengl desktop
endif
ifneq ($(DEB_HOST_ARCH_OS),$(findstring $(DEB_HOST_ARCH_OS), linux kfreebsd))
ifneq ($(DEB_HOST_ARCH_OS),$(findstring $(DEB_HOST_ARCH_OS), linux))
extra_configure_opts += -no-eglfs
endif
@ -53,7 +53,6 @@ ifeq ($(DEB_HOST_ARCH_CPU),i386)
cpu_opt = -no-sse2 -no-pch
endif
mkspec_osmap_kfreebsd = gnukfreebsd
platform_os = $(or $(mkspec_osmap_$(DEB_HOST_ARCH_OS)),$(DEB_HOST_ARCH_OS))
platform_arg = $(platform_os)-g++