fixes segfault on Assistant's startup
authorThan Ngo <than@redhat.com>
Tue, 22 Aug 2023 13:42:24 +0000 (14:42 +0100)
committerRoberto C. Sánchez <roberto@debian.org>
Tue, 22 Aug 2023 13:42:24 +0000 (14:42 +0100)
Origin: https://bugreports.qt-project.org/browse/QTBUG-25324
Bug: https://bugreports.qt-project.org/browse/QTBUG-25324
Bug-Debian: http://bugs.debian.org/679874
Forwarded: not-needed
Last-Update: 2012-06-20

This patch calls the static method QApplication::allWidgets()
intead of storing them first.

Gbp-Pq: Name QTBUG-25324_assistant_segfault_on_start_with_gcc_4.7.patch

tools/assistant/tools/assistant/mainwindow.cpp

index bbf9b8e2dbd66caeb84c6aaa66f330650a3c34d9..75510fad94938eda7eff2bbbafba7be9d8bfa5e1 100644 (file)
@@ -947,8 +947,7 @@ void MainWindow::updateApplicationFont()
     if (helpEngine.usesAppFont())
         font = helpEngine.appFont();
 
-    const QWidgetList &widgets = qApp->allWidgets();
-    foreach (QWidget* widget, widgets)
+    foreach (QWidget* widget, QApplication::allWidgets())
         widget->setFont(font);
 }