public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt5-qttools] f45: Fix rhbz#2501765, qtdiag crash
@ 2026-08-12  9:01 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-08-12  9:01 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/qt5-qttools
Branch : f45
Commit : 775e2edfb4850d5cc6e8a6b180d99df37eb5cc46
Author : Than Ngo <than@redhat.com>
Date   : 2026-08-12T10:33:37+02:00
Stats  : +40/-3 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/qt5-qttools/c/775e2edfb4850d5cc6e8a6b180d99df37eb5cc46?branch=f45

Log:
Fix rhbz#2501765, qtdiag crash

---
diff --git a/qt5-qttools.spec b/qt5-qttools.spec
index 3640568..bef2d71 100644
--- a/qt5-qttools.spec
+++ b/qt5-qttools.spec
@@ -13,7 +13,7 @@
 Summary: Qt5 - QtTool components
 Name:    qt5-qttools
 Version: 5.15.18
-Release: 5%{?dist}
+Release: 6%{?dist}
 
 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
 Url:     http://www.qt.io
@@ -37,6 +37,8 @@ Patch104: qttools-opensource-src-5.7-add-libatomic.patch
 # Link against libclang-cpp.so
 # https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package
 Patch105: Link-against-libclang-cpp.so-instead-of-the-clang-co.patch
+# Fix qtdiag crash
+Patch106: qttools-qtdiag-crash.patch
 
 Source20: assistant.desktop
 Source21: designer.desktop
@@ -186,11 +188,10 @@ Requires: %{name}-common = %{version}-%{release}
 %patch -P104 -p1 -b .libatomic
 %endif
 %patch -P105 -p1 -b .libclang-cpp
+%patch -P106 -p1 -b .qtdiag-crash
 
 
 %build
-# TODO: Please submit an issue to upstream (rhbz#2381396)
-export CMAKE_POLICY_VERSION_MINIMUM=3.5
 %{qmake_qt5} \
   CONFIG+=disable_external_rpath \
   %{?no_examples}
@@ -495,6 +496,9 @@ fi
 
 
 %changelog
+* Wed Aug 12 2026 Than Ngo <than@redhat.com> - 5.15.18-6
+- Fix rhbz#2501765, qtdiag crash
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.15.18-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

diff --git a/qttools-qtdiag-crash.patch b/qttools-qtdiag-crash.patch
new file mode 100644
index 0000000..0f22d27
--- /dev/null
+++ b/qttools-qtdiag-crash.patch
@@ -0,0 +1,33 @@
+diff -up qttools-everywhere-src-5.15.18/src/qtdiag/qtdiag.cpp.qtdiag-crash qttools-everywhere-src-5.15.18/src/qtdiag/qtdiag.cpp
+--- qttools-everywhere-src-5.15.18/src/qtdiag/qtdiag.cpp.qtdiag-crash	2025-03-30 13:49:56.000000000 +0200
++++ qttools-everywhere-src-5.15.18/src/qtdiag/qtdiag.cpp	2026-08-10 17:05:45.981807663 +0200
+@@ -189,14 +189,24 @@ void dumpGlInfo(QTextStream &str, bool l
+         QWindow window;
+         window.setSurfaceType(QSurface::OpenGLSurface);
+         window.create();
++        if (!context.makeCurrent(&window)) {
++            str << "\nUnable to make OpenGL context current for the window.\n";
++            return;
++        }
+         context.makeCurrent(&window);
+         QOpenGLFunctions functions(&context);
+ 
+-        str << " Vendor: " << reinterpret_cast<const char *>(functions.glGetString(GL_VENDOR))
+-            << "\nRenderer: " << reinterpret_cast<const char *>(functions.glGetString(GL_RENDERER))
+-            << "\nVersion: " << reinterpret_cast<const char *>(functions.glGetString(GL_VERSION))
+-            << "\nShading language: " << reinterpret_cast<const char *>(functions.glGetString(GL_SHADING_LANGUAGE_VERSION))
+-            <<  "\nFormat: " << context.format();
++        const char *vendor = reinterpret_cast<const char *>(functions.glGetString(GL_VENDOR));
++        const char *renderer = reinterpret_cast<const char *>(functions.glGetString(GL_RENDERER));
++        const char *version = reinterpret_cast<const char *>(functions.glGetString(GL_VERSION));
++        const char *shadingLang = reinterpret_cast<const char *>(functions.glGetString(GL_SHADING_LANGUAGE_VERSION));
++
++        str << " Vendor: " << (vendor ? vendor : "Unknown")
++            << "\nRenderer: " << (renderer ? renderer : "Unknown")
++            << "\nVersion: " << (version ? version : "Unknown")
++            << "\nShading language: " << (shadingLang ? shadingLang : "Unknown")
++            << "\nFormat: " << context.format();
++
+ #  ifndef QT_OPENGL_ES_2
+         GLint majorVersion;
+         functions.glGetIntegerv(GL_MAJOR_VERSION, &majorVersion);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-12  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-12  9:01 [rpms/qt5-qttools] f45: Fix rhbz#2501765, qtdiag crash Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox