From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B9A8F158245 for ; Fri, 6 Dec 2024 21:34:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA2E9E0940; Fri, 6 Dec 2024 21:33:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30212E0933 for ; Fri, 6 Dec 2024 21:33:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5CD37340C7B for ; Fri, 6 Dec 2024 21:33:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B5A2F1AB5 for ; Fri, 6 Dec 2024 21:33:56 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1733520804.eddeea4b483a20a09665ae9b8e7ea1ce7ab03c24.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/falkon/, www-client/falkon/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-client/falkon/falkon-24.08.3-r1.ebuild www-client/falkon/files/falkon-24.08.3-fix-printing.patch X-VCS-Directories: www-client/falkon/ www-client/falkon/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: eddeea4b483a20a09665ae9b8e7ea1ce7ab03c24 X-VCS-Branch: master Date: Fri, 6 Dec 2024 21:33:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 734d2fc3-e946-462e-836c-517dedeeb261 X-Archives-Hash: 5c2910aaee7a83616f78f877a4d60862 commit: eddeea4b483a20a09665ae9b8e7ea1ce7ab03c24 Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Dec 6 21:29:19 2024 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Dec 6 21:33:24 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eddeea4b www-client/falkon: Fix printing to printer other than PDF printer KDE-bug: https://bugs.kde.org/show_bug.cgi?id=497051 Closes: https://bugs.gentoo.org/945887 Signed-off-by: Andreas Sturmlechner gentoo.org> www-client/falkon/falkon-24.08.3-r1.ebuild | 85 ++++++++++++++++++ .../falkon/files/falkon-24.08.3-fix-printing.patch | 100 +++++++++++++++++++++ 2 files changed, 185 insertions(+) diff --git a/www-client/falkon/falkon-24.08.3-r1.ebuild b/www-client/falkon/falkon-24.08.3-r1.ebuild new file mode 100644 index 000000000000..4da6bc55c8ea --- /dev/null +++ b/www-client/falkon/falkon-24.08.3-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="true" +KFMIN=6.5.0 +QTMIN=6.7.2 +PYTHON_COMPAT=( python3_{10..12} ) +inherit ecm gear.kde.org python-single-r1 + +DESCRIPTION="Cross-platform web browser using QtWebEngine" +HOMEPAGE="https://www.falkon.org/ https://apps.kde.org/falkon/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="dbus kde python +X" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="test" # bug 653046 + +COMMON_DEPEND=" + dev-libs/openssl:0= + >=dev-qt/qt5compat-${QTMIN}:6 + >=dev-qt/qtbase-${QTMIN}:6[dbus?,gui,network,sql,sqlite,ssl,widgets] + >=dev-qt/qtdeclarative-${QTMIN}:6[widgets] + >=dev-qt/qtwebchannel-${QTMIN}:6 + >=dev-qt/qtwebengine-${QTMIN}:6=[widgets] + >=kde-frameworks/karchive-${KFMIN}:6 + virtual/libintl + kde? ( + >=kde-frameworks/kcoreaddons-${KFMIN}:6 + >=kde-frameworks/kcrash-${KFMIN}:6 + >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/kjobwidgets-${KFMIN}:6 + >=kde-frameworks/kwallet-${KFMIN}:6 + >=kde-frameworks/purpose-${KFMIN}:6 + ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep " + >=dev-python/pyside6-${QTMIN}[designer,gui,positioning,webengine,widgets,\${PYTHON_USEDEP}] \ + >=dev-python/shiboken6-${QTMIN}[\${PYTHON_USEDEP}] + ") + ) + X? ( + x11-libs/libxcb:= + x11-libs/xcb-util + ) +" +DEPEND="${COMMON_DEPEND} + >=dev-qt/qtbase-${QTMIN}:6[concurrent] +" +if [[ ${KDE_BUILD_TYPE} != live ]]; then + DEPEND+=" >=kde-frameworks/ki18n-${KFMIN}:6" +fi +RDEPEND="${COMMON_DEPEND} + >=dev-qt/qtsvg-${QTMIN}:6 +" +BDEPEND=">=dev-qt/qttools-${QTMIN}:6[linguist]" + +PATCHES=( "${FILESDIR}/${P}-fix-printing.patch" ) # bug 945887 + +pkg_setup() { + use python && python-single-r1_pkg_setup + ecm_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DBUILD_KEYRING=OFF + -DDISABLE_DBUS=$(usex !dbus) + $(cmake_use_find_package kde KF6Wallet) + $(cmake_use_find_package kde KF6KIO) + -DBUILD_PYTHON_SUPPORT=$(usex python) + -DNO_X11=$(usex !X) + ) + use python && mycmakeargs+=( + -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" # shiboken_helpers.cmake quirk + -DPython3_INCLUDE_DIR=$(python_get_includedir) + -DPython3_LIBRARY=$(python_get_library_path) + ) + ecm_src_configure +} diff --git a/www-client/falkon/files/falkon-24.08.3-fix-printing.patch b/www-client/falkon/files/falkon-24.08.3-fix-printing.patch new file mode 100644 index 000000000000..8e5aecd366d8 --- /dev/null +++ b/www-client/falkon/files/falkon-24.08.3-fix-printing.patch @@ -0,0 +1,100 @@ +From cbf47b0625c9b67b3608e24600273693bd59462a Mon Sep 17 00:00:00 2001 +From: Juraj Oravec +Date: Wed, 4 Dec 2024 21:34:31 +0100 +Subject: [PATCH] Fix printing to printer other than PDF printer + +BUG: 497051 +FIXED-IN: 24.12 + +Chery picked from: eaa807023517e1d62dae41f9b1cdd93806d77d64 + +Signed-off-by: Juraj Oravec +--- + src/lib/webengine/webview.cpp | 22 ++++++++++++++-------- + src/lib/webengine/webview.h | 4 ++++ + 2 files changed, 18 insertions(+), 8 deletions(-) + +diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp +index d2b5d7ee0..4871e8b3f 100644 +--- a/src/lib/webengine/webview.cpp ++++ b/src/lib/webengine/webview.cpp +@@ -67,6 +67,7 @@ WebView::WebView(QWidget* parent) + connect(this, &QWebEngineView::iconChanged, this, &WebView::slotIconChanged); + connect(this, &QWebEngineView::urlChanged, this, &WebView::slotUrlChanged); + connect(this, &QWebEngineView::titleChanged, this, &WebView::slotTitleChanged); ++ connect(this, &QWebEngineView::printFinished, this, &WebView::slotPrintFinished); + + m_currentZoomLevel = zoomLevels().indexOf(100); + +@@ -386,11 +387,11 @@ void WebView::printPage() + { + Q_ASSERT(m_page); + +- auto *printer = new QPrinter(); +- printer->setCreator(tr("Falkon %1 (%2)").arg(QString::fromLatin1(Qz::VERSION), QString::fromLatin1(Qz::WWWADDRESS))); +- printer->setDocName(QzTools::filterCharsFromFilename(title())); ++ m_printer = new QPrinter(); ++ m_printer->setCreator(tr("Falkon %1 (%2)").arg(QString::fromLatin1(Qz::VERSION), QString::fromLatin1(Qz::WWWADDRESS))); ++ m_printer->setDocName(QzTools::filterCharsFromFilename(title())); + +- auto *dialog = new QPrintDialog(printer, this); ++ auto *dialog = new QPrintDialog(m_printer, this); + dialog->setOptions(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintShowPageSize); + #ifndef Q_OS_WIN + dialog->setOption(QAbstractPrintDialog::PrintPageRange); +@@ -402,14 +403,19 @@ void WebView::printPage() + m_page->printToPdf(dialog->printer()->outputFileName(), dialog->printer()->pageLayout()); + delete dialog; + } else { +- connect(this, &QWebEngineView::printFinished, this, [&dialog](bool success) { +- Q_UNUSED(success); +- delete dialog; +- }); ++ print(m_printer); ++ delete dialog; + } + } + } + ++void WebView::slotPrintFinished(bool success) ++{ ++ Q_UNUSED(success); ++ delete m_printer; ++ m_printer = nullptr; ++} ++ + void WebView::slotLoadStarted() + { + m_progress = 0; +diff --git a/src/lib/webengine/webview.h b/src/lib/webengine/webview.h +index 37138cd6d..61e7281f8 100644 +--- a/src/lib/webengine/webview.h ++++ b/src/lib/webengine/webview.h +@@ -25,6 +25,7 @@ + #include "loadrequest.h" + #include "wheelhelper.h" + ++class QPrinter; + class WebPage; + class LoadRequest; + class WebHitTestResult; +@@ -118,6 +119,7 @@ protected Q_SLOTS: + void slotIconChanged(); + void slotUrlChanged(const QUrl &url); + void slotTitleChanged(const QString &title); ++ void slotPrintFinished(bool success); + + // Context menu slots + void openUrlInNewWindow(); +@@ -193,6 +195,8 @@ private: + WheelHelper m_wheelHelper; + + static bool s_forceContextMenuOnMouseRelease; ++ ++ QPrinter* m_printer; + }; + + #endif // WEBVIEW_H +-- +GitLab +