qt5: 5.15.0 -> 5.15.1

This commit is contained in:
Danny Rawlins 2020-09-19 23:01:52 +10:00
parent d8892d8e24
commit c46e2f16ab
7 changed files with 4359 additions and 4442 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/T1XrDYTpbN2ZhIgQmhMfdRVTcAsM2qI3feD9bmvrsjhbaWDfNgpq8MuXFN6EylF9pK4ZZa2s5PhNEBLIy/c5gE=
SHA256 (Pkgfile) = 3d3e869c5d35191eab4a3c6e7e38b833d58345c534e6e62e588b794c86f2b56f
SHA256 (.footprint) = 8860b0f2e86d9d4f9630a7894af8d99f5fb4956ac931da9abe0f30a78d68ecd1
SHA256 (qt-everywhere-src-5.15.0.tar.xz) = 22b63d7a7a45183865cc4141124f12b673e7a17b1fe2b91e433f6547c5d548c3
RWSE3ohX2g5d/RJ10GVjoDP/2pBFnuXpHrQ44qm149TENHQYMIYDYOihiNH8lEjECw6Lef1fqUof6bEnTxZr0Y6SRXuCQROK2g0=
SHA256 (Pkgfile) = 32ceba7cac22f70cd3216b86582a98dbb3ed2c8177027d70db18f24f39f59a60
SHA256 (.footprint) = 9c4a44a35f234188960e6357527e88e974878438c09dc607ee503048b86a95e3
SHA256 (qt-everywhere-src-5.15.1.tar.xz) = 44da876057e21e1be42de31facd99be7d5f9f07893e1ea762359bcee0ef64ee9
SHA256 (qt5-cflags.patch) = cf707cd970650f8b60f8897692b36708ded9ba116723ec8fcd885576783fe85c
SHA256 (qt5-logo.png) = ae1335ecd1cd2d17032184895ab298a636cdfa8121b0ed71307c4f2b23ec928e
SHA256 (qt5-base-QTBUG-82910.patch) = abb94453c9fe54fde4811bc5475b88796c8db1f5cd75ddc68918aff20139b1aa
SHA256 (qtbug-74252.patch) = 0c489d2faedd35670232a2c028c5c78a606ab81bb6f40f58e3cfe2bc6b6ac3b2
SHA256 (qtbug-78966.patch) = d7d58b2cadd6e79c3dfb69da664ecac9c95a78d6e142cb8687fce68e24a10776

View File

@ -5,42 +5,22 @@
# Optional: icu
name=qt5
version=5.15.0
version=5.15.1
release=1
source=(https://download.qt.io/official_releases/qt/${version::4}/$version/single/qt-everywhere-src-$version.tar.xz
qt5-logo.png
qt5-base-QTBUG-82910.patch
qtbug-74252.patch
qtbug-78966.patch)
qt5-cflags.patch
qt5-logo.png)
build() {
cd qt-everywhere-src-$version
patch -d qtbase -p1 -i $SRC/qt5-base-QTBUG-82910.patch # https://codereview.qt-project.org/c/qt/qtbase/+/299182
patch -d qtbase -p1 -i $SRC/qtbug-74252.patch # Fix displaying custom icons
patch -d qtbase -p1 -i $SRC/qtbug-78966.patch # Fix QToolButton menus on multi-screen systems
patch -d qtbase -p1 -i $SRC/qt5-cflags.patch
export PYTHON='/usr/bin/python3'
mkdir $SRC/bin
ln -s /usr/bin/python3 $SRC/bin/python
export PATH="$SRC/bin:$PATH"
# Respect system CXX
[ "$CXX" ] || CXX=g++
sed -e "/^QMAKE_CXX\s/s|=.*|= $CXX|" \
-i qtbase/mkspecs/common/g++-base.conf
# Remove obsolete xorg path
sed -e 's|X11R6/||g' -i qtbase/mkspecs/*/*.conf
# Respect system CXXFLAGS
sed -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CXXFLAGS}|" \
-i qtbase/mkspecs/common/gcc-base.conf
# Respect system LDFLAGS
sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \
-i qtbase/mkspecs/common/g++-unix.conf
export QTDIR="$PWD"
export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins"
@ -83,13 +63,9 @@ build() {
make
make -j1 INSTALL_ROOT=$PKG install
sed 's|/usr/bin/python|/usr/bin/python3|g' \
-i $PKG/usr/lib/qt5/mkspecs/features/uikit/devices.py
2to3 --write --nobackups $PKG/usr/lib/qt5/mkspecs/features/uikit/devices.py
# Fix paths
find $PKG/usr/lib/ -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
find "$PKG/usr/lib" -type f -name '*.prl' \
-exec sed -e '/^QMAKE_PRL_BUILD_DIR/d' -i {} \;
sed -e "s|$PWD/qtbase|/usr/lib/qt5|g" \
-i $PKG/usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri

View File

@ -1,75 +0,0 @@
From 54aa63be9b74e8de72db9efbe6809ab1a97b29a7 Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <takao.fujiwara1@gmail.com>
Date: Mon, 11 May 2020 21:14:01 +0900
Subject: [PATCH] IBus: Use WAYLAND_DISPLAY on Wayland sessions to make up
socket names
A recent change in IBus made it prefer the WAYLAND_DISPLAY envvar in
order to compose its socket path for Wayland sessions. This is because
DISPLAY is unreliable in those environment: It might not be there, there
might be several displays pointing to the same Xwayland server (as it's
the case in GNOME 3.36), or there might even be multiple Xwayland servers
(eg. to enforce inter-app isolation with X11 apps).
Fixes: QTBUG-82910
Pick-To: 5.15
Change-Id: I4883b5d06863ba284883dd95281bed2ce7203e29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
---
.../ibus/qibusplatforminputcontext.cpp | 38 +++++++++++++++-------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index 47ac54927bc..16c0ebfe213 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -712,19 +712,35 @@ void QIBusPlatformInputContextPrivate::createBusProxy()
QString QIBusPlatformInputContextPrivate::getSocketPath()
{
- QByteArray display(qgetenv("DISPLAY"));
- QByteArray host = "unix";
+ QByteArray display;
QByteArray displayNumber = "0";
+ bool isWayland = false;
+
+ if (qEnvironmentVariableIsSet("IBUS_ADDRESS_FILE")) {
+ QByteArray path = qgetenv("IBUS_ADDRESS_FILE");
+ return QString::fromLocal8Bit(path);
+ } else if (qEnvironmentVariableIsSet("WAYLAND_DISPLAY")) {
+ display = qgetenv("WAYLAND_DISPLAY");
+ isWayland = true;
+ } else {
+ display = qgetenv("DISPLAY");
+ }
+ QByteArray host = "unix";
+
+ if (isWayland) {
+ displayNumber = display;
+ } else {
+ int pos = display.indexOf(':');
+ if (pos > 0)
+ host = display.left(pos);
+ ++pos;
+ int pos2 = display.indexOf('.', pos);
+ if (pos2 > 0)
+ displayNumber = display.mid(pos, pos2 - pos);
+ else
+ displayNumber = display.mid(pos);
+ }
- int pos = display.indexOf(':');
- if (pos > 0)
- host = display.left(pos);
- ++pos;
- int pos2 = display.indexOf('.', pos);
- if (pos2 > 0)
- displayNumber = display.mid(pos, pos2 - pos);
- else
- displayNumber = display.mid(pos);
if (debug)
qDebug() << "host=" << host << "displayNumber" << displayNumber;
--
2.16.3

46
qt5/qt5-cflags.patch Normal file
View File

@ -0,0 +1,46 @@
diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf
index a493cd5984..41342f5020 100644
--- a/mkspecs/common/g++-unix.conf
+++ b/mkspecs/common/g++-unix.conf
@@ -10,5 +10,6 @@
include(g++-base.conf)
-QMAKE_LFLAGS_RELEASE += -Wl,-O1
+SYSTEM_LDFLAGS = $$(LDFLAGS)
+!isEmpty(SYSTEM_LDFLAGS) { eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS)) } else { QMAKE_LFLAGS_RELEASE += -Wl,-O1 }
QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index 1f919d270a..7ef6046326 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -40,9 +40,11 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
QMAKE_CFLAGS_DEPS += -M
QMAKE_CFLAGS_WARN_ON += -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
-QMAKE_CFLAGS_DEBUG += -g
+SYSTEM_CFLAGS = $$(CFLAGS)
+SYSTEM_DEBUG_CFLAGS = $$(DEBUG_CFLAGS)
+!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE += $$(CPPFLAGS) $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
+!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
+!isEmpty(SYSTEM_DEBUG_CFLAGS) { eval(QMAKE_CFLAGS_DEBUG += $$(DEBUG_CFLAGS)) } else { QMAKE_CFLAGS_DEBUG += -g }
QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC
QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC
QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC
@@ -59,9 +61,11 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+SYSTEM_CXXFLAGS = $$(CXXFLAGS)
+SYSTEM_DEBUG_CXXFLAGS = $$(DEBUG_CXXFLAGS)
+!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE += $$(CPPFLAGS) $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
+!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
+!isEmpty(SYSTEM_DEBUG_CXXFLAGS) { eval(QMAKE_CXXFLAGS_DEBUG += $$(DEBUG_CXXFLAGS)) } else { QMAKE_CXXFLAGS_DEBUG += -g }
QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP

View File

@ -1,106 +0,0 @@
From add92a551cf601b5c9e074046326f95ccc38062e Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Sat, 23 May 2020 01:35:18 +0200
Subject: [PATCH] Do not fully initialize QIconLoader when setting the fallback
theme
We need this because without this patch you get bugs both
if you call QIcon::setFallbackThemeName before creating the QGuiApplication and
if you call QIcon::setFallbackThemeName after creating QGuiApplication
Why do you get a bug if you call QIconLoader::setFallbackThemeName
before creating the QGuiApplication:
* QIcon::setFallbackThemeName calls QIconLoader::instance
* QIconLoader::instance calls QIconLoader::ensureInitialized
* QIconLoader::ensureInitialized calls systemThemeName
* systemThemeName asks the current QPlatformTheme for its
QPlatformTheme::SystemIconThemeName
* But since we're calling this before creating the QGuiApplication
there is no current QPlatformTheme yet, so systemThemeName
is set to empty, which is obviously not what we want
Why do you get a bug if you call QIconLoader::setFallbackThemeName
after creating the QGuiApplication:
* QGuiApplicationPrivate::init calls
QGuiApplicationPrivate::createPlatformIntegration
* QGuiApplicationPrivate::createPlatformIntegration sets the
current QPlatformTheme and at the end of the very same function
uses QIcon::fromTheme
* Since we haven't called QIconLoader::setFallbackThemeName yet
there is at least one icon lookup that doesn't take
the fallback theme we would like to have into account
This patch makes it so calling QIconLoader::setFallbackThemeName
before creating the QGuiApplication works.
The only thing we want to do from QIcon::setFallbackThemeName is set
the internal m_userFallbackTheme, it doesn't care about doing
further initialization of QIconLoader, if it's done, great it's done,
if it is not initialized yet, great it will be initialized later
when someone actually tries to use the QIconloader.
So it's OK for ensureInitialized() to return early if there is no
platform theme yet, because it will be called again later.
Pick-to: 5.12
Pick-to: 5.15
Fixes: QTBUG-74252
Change-Id: I65268fc3d3d0bd282d76c76cf75e495bcc9d1a30
Done-with: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
---
src/gui/image/qicon.cpp | 3 +++
src/gui/image/qiconloader.cpp | 15 ++++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 36f499711e9..91da21c477d 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1238,6 +1238,9 @@ QString QIcon::fallbackThemeName()
themeSearchPath() containing an index.theme
file describing its contents.
+ \note This should be done before creating \l QGuiApplication, to ensure
+ correct initialization.
+
\sa fallbackThemeName(), themeSearchPaths(), themeName()
*/
void QIcon::setFallbackThemeName(const QString &name)
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 15ab1b3cd90..3fa3bb9c598 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -112,10 +112,9 @@ extern QFactoryLoader *qt_iconEngineFactoryLoader(); // qicon.cpp
void QIconLoader::ensureInitialized()
{
if (!m_initialized) {
+ if (!QGuiApplicationPrivate::platformTheme())
+ return; // it's too early: try again later (QTBUG-74252)
m_initialized = true;
-
- Q_ASSERT(qApp);
-
m_systemTheme = systemThemeName();
if (m_systemTheme.isEmpty())
@@ -125,6 +124,16 @@ void QIconLoader::ensureInitialized()
}
}
+/*!
+ \internal
+ Gets an instance.
+
+ \l QIcon::setFallbackThemeName() should be called before QGuiApplication is
+ created, to avoid a race condition (QTBUG-74252). When this function is
+ called from there, ensureInitialized() does not succeed because there
+ is no QPlatformTheme yet, so systemThemeName() is empty, and we don't want
+ m_systemTheme to get intialized to the fallback theme instead of the normal one.
+*/
QIconLoader *QIconLoader::instance()
{
iconLoaderInstance()->ensureInitialized();
--
2.16.3

View File

@ -1,39 +0,0 @@
From 777f2a1c1e7e1cd669cc152aaa5b99d68b8a1ccd Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Wed, 10 Jun 2020 11:26:00 +0200
Subject: Fix QToolButton menus showing on primary screens in multiscreen
setups
Calculate an initial position based on the current size hint
and pass it to QMenuPrivate::exec(), which does screen checks
based on it.
Amends a78d66743171557d79b16c08be775e3ac15bb4ef.
Fixes: QTBUG-84462
Task-number: QTBUG-78966
Change-Id: Icae8d2bc0fb50c4c853cfebaa2b2250fc06542e3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ad532ce118b7052be3b69999cef2eb610e66fa88)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
src/widgets/widgets/qtoolbutton.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index 314c6ab40c..e380cb647b 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -805,7 +805,8 @@ void QToolButtonPrivate::popupTimerDone()
// QTBUG-78966, Delay positioning until after aboutToShow().
auto positionFunction = [q, horizontal](const QSize &sizeHint) {
return positionMenu(q, horizontal, sizeHint); };
- actualMenu->d_func()->exec({}, nullptr, positionFunction);
+ const auto initialPos = positionFunction(actualMenu->sizeHint());
+ actualMenu->d_func()->exec(initialPos, nullptr, positionFunction);
if (!that)
return;
--
cgit v1.2.1