From d3e89a8f7644370f16c66eb03fa0982c53388c70 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 11 Oct 2022 09:29:53 -0500 Subject: [PATCH] make mixing verisons and private api usage a warning instead of fatal error --- qt5-qtbase.spec | 11 ++++++++++- ...e-everywhere-src-5.15.6-private_api_warning.patch | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 qtbase-everywhere-src-5.15.6-private_api_warning.patch diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index 9dcaa7f..1504935 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -61,7 +61,7 @@ BuildRequires: pkgconfig(libsystemd) Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.15.6 -Release: 1%{?dist} +Release: 2%{?dist} # See LGPL_EXCEPTIONS.txt, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -86,6 +86,9 @@ Source10: macros.qt5-qtbase # support multilib optflags Patch2: qtbase-multilib_optflags.patch +# make mixing versions with private apis a warning instead of fatal error +Patch3: qtbase-everywhere-src-5.15.6-private_api_warning.patch + # upstreamable patches # namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755) Patch50: qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch @@ -390,6 +393,9 @@ Qt5 libraries used for drawing widgets and OpenGL items. %prep %setup -q -n %{qt_module}-everywhere-src-%{version} +## dowstream patches +%patch3 -p1 -b .private_api_warning + ## upstream fixes %patch50 -p1 -b .QT_VERSION_CHECK @@ -1097,6 +1103,9 @@ fi %changelog +* Tue Oct 11 2022 Rex Dieter - 5.15.6-2 +- make mixing verisons and private api usage a warning instead of fatal error + * Tue Sep 20 2022 Jan Grulich - 5.15.6-1 - 5.15.6 diff --git a/qtbase-everywhere-src-5.15.6-private_api_warning.patch b/qtbase-everywhere-src-5.15.6-private_api_warning.patch new file mode 100644 index 0000000..16cc9af --- /dev/null +++ b/qtbase-everywhere-src-5.15.6-private_api_warning.patch @@ -0,0 +1,12 @@ +diff -up qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h.private_api_warning qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h +--- qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h.private_api_warning 2022-10-11 09:08:33.712070523 -0500 ++++ qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h 2022-10-11 09:10:58.647038619 -0500 +@@ -435,7 +435,7 @@ inline void QObjectPrivate::checkForInco + Q_UNUSED(version); + #else + if (Q_UNLIKELY(version != QObjectPrivateVersion)) { +- qFatal("Cannot mix incompatible Qt library (%d.%d.%d) with this library (%d.%d.%d)", ++ qWarning("Cannot mix incompatible Qt library (%d.%d.%d) with this library (%d.%d.%d)", + (version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff, + (QObjectPrivateVersion >> 16) & 0xff, (QObjectPrivateVersion >> 8) & 0xff, QObjectPrivateVersion & 0xff); + }