forked from pool/libqt5-qtbase
Qt from KDE git
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libqt5-qtbase?expand=0&rev=26
This commit is contained in:
parent
5916020b0d
commit
f04bc9a03c
@ -1,49 +0,0 @@
|
||||
From 6485b6d45ad165cf976138cf8ab683c42515e794 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Koehne <kai.koehne@qt.io>
|
||||
Date: Tue, 13 Oct 2020 15:47:31 +0200
|
||||
Subject: [PATCH] Fix allocated memory of QByteArray returned by QIODevice::readLine
|
||||
|
||||
If the maxSize argument is 0 (the default), QIODevice::readLine will
|
||||
allocate a QByteArray with the size of the next chunk of data, which
|
||||
may be quite large. Before returning, it then resizes the byte array
|
||||
to the actual size that was read.
|
||||
|
||||
But since change 6b884d2aa129, QByteArray::resize() does no
|
||||
longer shrink the capacity. This means that the returned QByteArray
|
||||
keeps it's maximum size as allocated memory. This can lead to
|
||||
excessive memory consumption, especially if the returned QByteArray's
|
||||
are stored for further processing in the client code.
|
||||
|
||||
Fix this by explicitly calling QByteArray::squeeze() before returning.
|
||||
|
||||
[ChangeLog][QtCore][QIODevice] Fixes a regression in Qt 5.15 causing
|
||||
QByteArray's that are returned by QIODevice::readLine() to
|
||||
consume large amounts of memory.
|
||||
|
||||
Fixes: QTBUG-87010
|
||||
Change-Id: I1f95fc4098849e900680fc945238bfeda881022c
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
(cherry picked from commit 263b29eedb223dec1ecaee193302070af87a1852,
|
||||
limited squeeze() call if bytes are actually read to preserve retVal.isNull()
|
||||
behavior in 5.15)
|
||||
---
|
||||
|
||||
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
|
||||
index cc1d110..0f11c2e 100644
|
||||
--- a/src/corelib/io/qiodevice.cpp
|
||||
+++ b/src/corelib/io/qiodevice.cpp
|
||||
@@ -1480,10 +1480,12 @@
|
||||
} else
|
||||
readBytes = readLine(result.data(), result.size());
|
||||
|
||||
- if (readBytes <= 0)
|
||||
+ if (readBytes <= 0) {
|
||||
result.clear();
|
||||
- else
|
||||
+ } else {
|
||||
result.resize(readBytes);
|
||||
+ result.squeeze();
|
||||
+ }
|
||||
|
||||
return result;
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
From 924424120a2c468511256072e05d1ecc7c0c74a7 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Date: Mon, 18 Jan 2021 07:40:54 -0800
|
||||
Subject: [PATCH 1/2] Fix build with GCC 11: include <limits>
|
||||
|
||||
Fixes: QTBUG-90395
|
||||
Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40
|
||||
(cherry picked from commit 9c56d4da2ff631a8c1c30475bd792f6c86bda53c)
|
||||
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
||||
(cherry picked from commit b2af6332ea37e45ab230a7a5d2d278f86d961b83)
|
||||
---
|
||||
src/corelib/global/qendian.h | 6 ++++--
|
||||
src/corelib/global/qfloat16.h | 1 +
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
|
||||
index 257efbbdbe..339f53abb6 100644
|
||||
--- a/src/corelib/global/qendian.h
|
||||
+++ b/src/corelib/global/qendian.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
-** Copyright (C) 2016 The Qt Company Ltd.
|
||||
-** Copyright (C) 2016 Intel Corporation.
|
||||
+** Copyright (C) 2021 The Qt Company Ltd.
|
||||
+** Copyright (C) 2021 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
@@ -44,6 +44,8 @@
|
||||
#include <QtCore/qfloat16.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
|
||||
index c7a9c87af3..5302be072e 100644
|
||||
--- a/src/corelib/global/qfloat16.h
|
||||
+++ b/src/corelib/global/qfloat16.h
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
+#include <limits>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 5519447b9db4023deca98e5b882845416a9c33f1 Mon Sep 17 00:00:00 2001
|
||||
From: Sheng Mao <shngmao@gmail.com>
|
||||
Date: Fri, 13 Nov 2020 22:34:46 -0700
|
||||
Subject: [PATCH] Let QXcbConnection::getTimestamp properly exit when X server
|
||||
quits
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
QXcbConnection::getTimestamp uses dummy events to get timestamp from
|
||||
X server. However, in some cases, X server shuts down while client tries
|
||||
to get timestamp. In this case, QXcbConnection::getTimestamp keeps
|
||||
getting null event and thus falls into indefinite loop.
|
||||
|
||||
This fix checks if xcb connection is still valid and use a special
|
||||
xcb_timestamp_t value, CurrentTime (0L), as returned value.
|
||||
CurrentTime should not be generated by X server and if getTimestamp
|
||||
returns this value, it means an "exception" case is triggered.
|
||||
|
||||
This fix is introduced because in kwin_x11 (KDE project), X server can
|
||||
exit on logout. kwin_x11 should handle disconnection from X server.
|
||||
But the indefinite loop prevents kwin_x11 to process disconnection
|
||||
event and therefore kwin_x11 cannot quit properly.
|
||||
|
||||
Fixes: QTBUG-88435
|
||||
Change-Id: Iaf7ef3f8a35fa8389d22a608e3c49041bf90e1b9
|
||||
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
||||
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
||||
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
||||
(cherry picked from commit dbd1c8b047700bb6d0adae848d6cbb89fa2fcfff)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbconnection.cpp | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
index c557109bd1..9abdae6a7c 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
@@ -763,7 +763,10 @@ xcb_timestamp_t QXcbConnection::getTimestamp()
|
||||
|
||||
xcb_generic_event_t *event = nullptr;
|
||||
|
||||
- while (!event) {
|
||||
+ // When disconnection is caused by X server, event will never be able to hold
|
||||
+ // a valid pointer. isConnected(), which calls xcb_connection_has_error(),
|
||||
+ // can handle this type of disconnection and properly quits the loop.
|
||||
+ while (isConnected() && !event) {
|
||||
connection()->sync();
|
||||
event = eventQueue()->peek([window, dummyAtom](xcb_generic_event_t *event, int type) {
|
||||
if (type != XCB_PROPERTY_NOTIFY)
|
||||
@@ -773,6 +776,14 @@ xcb_timestamp_t QXcbConnection::getTimestamp()
|
||||
});
|
||||
}
|
||||
|
||||
+ if (!event) {
|
||||
+ // https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#glossary
|
||||
+ // > One timestamp value (named CurrentTime) is never generated by the
|
||||
+ // > server. This value is reserved for use in requests to represent the
|
||||
+ // > current server time.
|
||||
+ return XCB_CURRENT_TIME;
|
||||
+ }
|
||||
+
|
||||
xcb_property_notify_event_t *pn = reinterpret_cast<xcb_property_notify_event_t *>(event);
|
||||
xcb_timestamp_t timestamp = pn->time;
|
||||
free(event);
|
||||
--
|
||||
2.30.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 45b201ea42f69510713ddd09fb092ed6f93ad1db Mon Sep 17 00:00:00 2001
|
||||
From: Ulf Hermann <ulf.hermann@qt.io>
|
||||
Date: Wed, 20 Jan 2021 10:42:36 +0100
|
||||
Subject: [PATCH] Partially revert 813a928c7c3cf98670b6043149880ed5c955efb9
|
||||
|
||||
Otherwise ASAN complains about mismatched new/delete.
|
||||
|
||||
Change-Id: I76ddcc388309e20055c93c68b9b6fa8a11b884e1
|
||||
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
|
||||
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
|
||||
(cherry picked from commit 606b03d0a35e71565c3a91588ef2db45b9262e27)
|
||||
---
|
||||
src/corelib/tools/qsharedpointer_impl.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
|
||||
index 4aee98af53..790c187cb9 100644
|
||||
--- a/src/corelib/tools/qsharedpointer_impl.h
|
||||
+++ b/src/corelib/tools/qsharedpointer_impl.h
|
||||
@@ -155,6 +155,9 @@ namespace QtSharedPointer {
|
||||
#endif
|
||||
inline void checkQObjectShared(...) { }
|
||||
inline void setQObjectShared(...) { }
|
||||
+
|
||||
+ inline void operator delete(void *ptr) { ::operator delete(ptr); }
|
||||
+ inline void operator delete(void *, void *) { }
|
||||
};
|
||||
// sizeof(ExternalRefCountData) = 12 (32-bit) / 16 (64-bit)
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
23
0001-Revert-Bump-version.patch
Normal file
23
0001-Revert-Bump-version.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From e08cc7a0cec3c6fb69415b8e76e70b37088b561c Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Mon, 21 Jun 2021 12:29:39 +0200
|
||||
Subject: [PATCH] Revert "Bump version"
|
||||
|
||||
This reverts commit 6344955d17e17e2398720fe60c34cfc2a4a95208.
|
||||
---
|
||||
.qmake.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.qmake.conf b/.qmake.conf
|
||||
index 1bf1a80475..9476d20099 100644
|
||||
--- a/.qmake.conf
|
||||
+++ b/.qmake.conf
|
||||
@@ -6,4 +6,4 @@ DEFINES += QT_NO_JAVA_STYLE_ITERATORS
|
||||
QT_SOURCE_TREE = $$PWD
|
||||
QT_BUILD_TREE = $$shadowed($$PWD)
|
||||
|
||||
-MODULE_VERSION = 5.15.3
|
||||
+MODULE_VERSION = 5.15.2
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 896bcb186161c38965bd002b28156a2aab4b4a76 Mon Sep 17 00:00:00 2001
|
||||
From: Ville Voutilainen <ville.voutilainen@qt.io>
|
||||
Date: Mon, 18 Jan 2021 09:58:17 +0200
|
||||
Subject: [PATCH 2/2] Build fixes for GCC 11
|
||||
|
||||
Task-number: QTBUG-89977
|
||||
Change-Id: Ic1b7ddbffb8a0a00f8c621d09a868f1d94a52c21
|
||||
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
(cherry picked from commit 813a928c7c3cf98670b6043149880ed5c955efb9)
|
||||
---
|
||||
src/corelib/text/qbytearraymatcher.h | 2 ++
|
||||
src/corelib/tools/qsharedpointer_impl.h | 3 ---
|
||||
src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +-
|
||||
3 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h
|
||||
index 0eedfc1d20..f5f9bef7b8 100644
|
||||
--- a/src/corelib/text/qbytearraymatcher.h
|
||||
+++ b/src/corelib/text/qbytearraymatcher.h
|
||||
@@ -42,6 +42,8 @@
|
||||
|
||||
#include <QtCore/qbytearray.h>
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
|
||||
index 790c187cb9..4aee98af53 100644
|
||||
--- a/src/corelib/tools/qsharedpointer_impl.h
|
||||
+++ b/src/corelib/tools/qsharedpointer_impl.h
|
||||
@@ -155,9 +155,6 @@ namespace QtSharedPointer {
|
||||
#endif
|
||||
inline void checkQObjectShared(...) { }
|
||||
inline void setQObjectShared(...) { }
|
||||
-
|
||||
- inline void operator delete(void *ptr) { ::operator delete(ptr); }
|
||||
- inline void operator delete(void *, void *) { }
|
||||
};
|
||||
// sizeof(ExternalRefCountData) = 12 (32-bit) / 16 (64-bit)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
index 9e7e1a5572..f0866a90ac 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
@@ -698,7 +698,7 @@ void QXcbWindow::show()
|
||||
if (isTransient(window())) {
|
||||
const QWindow *tp = window()->transientParent();
|
||||
if (tp && tp->handle())
|
||||
- transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();
|
||||
+ transientXcbParent = tp->handle()->winId();
|
||||
// Default to client leader if there is no transient parent, else modal dialogs can
|
||||
// be hidden by their parents.
|
||||
if (!transientXcbParent)
|
||||
--
|
||||
2.25.1
|
||||
|
18
_service
Normal file
18
_service
Normal file
@ -0,0 +1,18 @@
|
||||
<services>
|
||||
<service name="obs_scm" mode="disabled">
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="versionformat">5.15.2+kde@TAG_OFFSET@</param>
|
||||
<param name="url">https://invent.kde.org/qt/qt/qtbase.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="filename">qtbase-everywhere-src</param>
|
||||
<param name="revision">kde/5.15</param>
|
||||
<param name="parent-tag">v5.15.2</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
<service name="tar" mode="buildtime"/>
|
||||
<service name="recompress" mode="buildtime">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://invent.kde.org/qt/qt/qtbase.git</param>
|
||||
<param name="changesrevision">b8841b34c5b90bf32394568102888ddc559f3ddc</param></service></servicedata>
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 24 09:02:42 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Update to version 5.15.2+kde200:
|
||||
* Optimize quadratic-time insertion in QSortFilterProxyModel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 21 08:07:20 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Switch to KDE's maintenance branch
|
||||
- Update to version 5.15.2+kde199:
|
||||
* Too many changes to list here
|
||||
- Add patch to reset version to 5.15.2:
|
||||
* 0001-Revert-Bump-version.patch
|
||||
- Drop patches, now upstream:
|
||||
* 0001-Partially-revert-813a928c7c3cf98670b6043149880ed5c95.patch
|
||||
* 0001-Fix-allocated-memory-of-QByteArray.patch
|
||||
* 0001-Fix-build-with-GCC-11-include-limits.patch
|
||||
* 0001-Let-QXcbConnection-getTimestamp-properly-exit-when-X.patch
|
||||
* 0002-Build-fixes-for-GCC-11.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 26 11:49:02 UTC 2021 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%define qt5_snapshot 0
|
||||
%define qt5_snapshot 1
|
||||
%define journald 1
|
||||
|
||||
%ifarch %arm aarch64
|
||||
@ -29,7 +29,7 @@
|
||||
%bcond_without harfbuzz
|
||||
|
||||
Name: libqt5-qtbase
|
||||
Version: 5.15.2
|
||||
Version: 5.15.2+kde200
|
||||
Release: 0
|
||||
Summary: C++ Program Library, Core Components
|
||||
License: LGPL-3.0-only or GPL-3.0-with-Qt-Company-Qt-exception-1.1
|
||||
@ -38,8 +38,8 @@ Url: https://www.qt.io
|
||||
%define base_name libqt5
|
||||
%define real_version 5.15.2
|
||||
%define so_version 5.15.2
|
||||
%define tar_version qtbase-everywhere-src-5.15.2
|
||||
Source: https://download.qt.io/official_releases/qt/5.15/%{real_version}/submodules/%{tar_version}.tar.xz
|
||||
%define tar_version qtbase-everywhere-src-%{version}
|
||||
Source: %{tar_version}.tar.xz
|
||||
# to get mtime of file:
|
||||
Source1: libqt5-qtbase.changes
|
||||
Source2: macros.qt5
|
||||
@ -52,6 +52,7 @@ Patch2: fix-build-openssl-1.1.0.patch
|
||||
Patch3: 0001-Revert-QMenu-hide-when-a-QWidgetAction-fires-the-tri.patch
|
||||
# Proposed: https://bugreports.qt.io/browse/QTBUG-88491
|
||||
Patch4: 0001-Avoid-SIGABRT-on-platform-plugin-initialization-fail.patch
|
||||
Patch5: 0001-Revert-Bump-version.patch
|
||||
# PATCH-FIX-OPENSUSE disable-rc4-ciphers-bnc865241.diff bnc#865241-- Exclude rc4 ciphers from being used by default
|
||||
Patch6: disable-rc4-ciphers-bnc865241.diff
|
||||
Patch8: tell-the-truth-about-private-api.patch
|
||||
@ -63,16 +64,9 @@ Patch12: 0001-Add-remote-print-queue-support.patch
|
||||
Patch21: 0001-Don-t-white-list-recent-Mesa-versions-for-multithrea.patch
|
||||
Patch24: fix-fixqt4headers.patch
|
||||
# patches 1000-2000 and above from upstream 5.15 branch #
|
||||
# Merged: https://bugreports.qt.io/browse/QTBUG-87010
|
||||
Patch1000: 0001-Fix-allocated-memory-of-QByteArray.patch
|
||||
# Merged: https://bugreports.qt.io/browse/QTBUG-88435
|
||||
Patch1001: 0001-Let-QXcbConnection-getTimestamp-properly-exit-when-X.patch
|
||||
# patches 2000-3000 and above from upstream qt6/dev branch #
|
||||
# Not accepted yet, https://codereview.qt-project.org/c/qt/qtbase/+/255384
|
||||
Patch2001: 0002-Synthesize-Enter-LeaveEvent-for-accepted-QTabletEven.patch
|
||||
Patch2002: 0001-Fix-build-with-GCC-11-include-limits.patch
|
||||
Patch2003: 0002-Build-fixes-for-GCC-11.patch
|
||||
Patch2004: 0001-Partially-revert-813a928c7c3cf98670b6043149880ed5c95.patch
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: gcc-c++
|
||||
|
3
qtbase-everywhere-src-5.15.2+kde200.obscpio
Normal file
3
qtbase-everywhere-src-5.15.2+kde200.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ec691c39f69fbb46f9e1221543f4f41ddd62455b4b62a7c26f0d3c1ee8faa204
|
||||
size 291136015
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8
|
||||
size 50179672
|
5
qtbase-everywhere-src.obsinfo
Normal file
5
qtbase-everywhere-src.obsinfo
Normal file
@ -0,0 +1,5 @@
|
||||
name: qtbase-everywhere-src
|
||||
version: 5.15.2+kde200
|
||||
mtime: 1624296086
|
||||
commit: b8841b34c5b90bf32394568102888ddc559f3ddc
|
||||
|
Loading…
Reference in New Issue
Block a user