app-text/zeal: fix build against Qt 6.10

Backported from upstream https://github.com/zealdocs/zeal/pull/1728

Closes: https://bugs.gentoo.org/966442
Signed-off-by: Denis Lisov <dennis.lissov@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44978
Closes: https://github.com/gentoo/gentoo/pull/44978
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
This commit is contained in:
Denis Lisov 2025-12-10 16:38:10 +03:00 committed by Mike Pagano
parent e039c97624
commit 076e08ee15
No known key found for this signature in database
GPG Key ID: FA1D8A7860CC2F96
3 changed files with 68 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 4549446008a321732335a2f46ab69a90a91acaa9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?=
<jaime.marquinez.ferrandiz@fastmail.net>
Date: Fri, 17 Oct 2025 16:45:30 +0200
Subject: [PATCH 1/2] Use the return value of QTemporaryFile::open
It is marked with [[nodiscard]] by default on Qt 6.10
---
src/libs/ui/docsetsdialog.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/libs/ui/docsetsdialog.cpp b/src/libs/ui/docsetsdialog.cpp
index 8c9fe633e380..6e2ccfec9db5 100644
--- a/src/libs/ui/docsetsdialog.cpp
+++ b/src/libs/ui/docsetsdialog.cpp
@@ -360,7 +360,8 @@ void DocsetsDialog::downloadCompleted()
QTemporaryFile *tmpFile = m_tmpFiles[docsetName];
if (!tmpFile) {
tmpFile = new QTemporaryFile(QStringLiteral("%1/%2.XXXXXX.tmp").arg(Core::Application::cacheLocation(), docsetName), this);
- tmpFile->open();
+ if (!tmpFile->open())
+ return;
m_tmpFiles.insert(docsetName, tmpFile);
}
@@ -403,7 +404,8 @@ void DocsetsDialog::downloadProgress(qint64 received, qint64 total)
QTemporaryFile *tmpFile = m_tmpFiles[docsetName];
if (!tmpFile) {
tmpFile = new QTemporaryFile(QStringLiteral("%1/%2.XXXXXX.tmp").arg(Core::Application::cacheLocation(), docsetName), this);
- tmpFile->open();
+ if (!tmpFile->open())
+ return;
m_tmpFiles.insert(docsetName, tmpFile);
}
--
2.52.0

View File

@ -0,0 +1,27 @@
From 2173c20b95c5b64a3f6c3ba1f5b7d47f948b1f41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?=
<jaime.marquinez.ferrandiz@fastmail.net>
Date: Fri, 17 Oct 2025 16:54:58 +0200
Subject: [PATCH 2/2] Fix linking with Qt::GuiPrivate on Qt 6.10
---
src/libs/ui/qxtglobalshortcut/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libs/ui/qxtglobalshortcut/CMakeLists.txt b/src/libs/ui/qxtglobalshortcut/CMakeLists.txt
index 476c2f589768..cd2a25f33228 100644
--- a/src/libs/ui/qxtglobalshortcut/CMakeLists.txt
+++ b/src/libs/ui/qxtglobalshortcut/CMakeLists.txt
@@ -42,6 +42,9 @@ elseif(UNIX AND X11_FOUND)
find_package(Qt5 COMPONENTS X11Extras REQUIRED)
target_link_libraries(QxtGlobalShortcut Qt5::X11Extras)
else()
+ if(Qt6Core_VERSION VERSION_GREATER_EQUAL 6.10)
+ find_package(Qt6 COMPONENTS GuiPrivate REQUIRED)
+ endif()
target_link_libraries(QxtGlobalShortcut Qt${QT_VERSION_MAJOR}::GuiPrivate)
endif()
--
2.52.0

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
@ -34,6 +34,8 @@ BDEPEND="kde-frameworks/extra-cmake-modules"
PATCHES=( PATCHES=(
"${FILESDIR}/disable-werror-0.7.2.patch" "${FILESDIR}/disable-werror-0.7.2.patch"
"${FILESDIR}/0001-Use-the-return-value-of-QTemporaryFile-open.patch"
"${FILESDIR}/0002-Fix-linking-with-Qt-GuiPrivate-on-Qt-6.10.patch"
) )
src_configure() { src_configure() {