From ddbc8d152370938bc7d0b91cb9225d591ef92b97 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 24 Jan 2022 10:55:59 +0000 Subject: [PATCH] fixes segfault on Assistant's startup 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index bbf9b8e2d..75510fad9 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -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); } -- 2.30.2