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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F15DC138335 for ; Wed, 30 Jan 2019 17:28:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D42D5E0948; Wed, 30 Jan 2019 17:28:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A2E9CE0948 for ; Wed, 30 Jan 2019 17:28:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 17726335D8D for ; Wed, 30 Jan 2019 17:28:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F84F52A for ; Wed, 30 Jan 2019 17:28:14 +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: <1548867820.547bdf84d94ecfcca5aa09cc2ebd6d1e8fc455ac.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/files/, kde-frameworks/kxmlgui/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kxmlgui/files/kxmlgui-5.54.0-kcheckaccelerators.patch kde-frameworks/kxmlgui/kxmlgui-5.54.0-r1.ebuild X-VCS-Directories: kde-frameworks/kxmlgui/ kde-frameworks/kxmlgui/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 547bdf84d94ecfcca5aa09cc2ebd6d1e8fc455ac X-VCS-Branch: master Date: Wed, 30 Jan 2019 17:28:14 +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: 3f363c61-99d6-44c7-9567-08abb0159ef4 X-Archives-Hash: 9d380a5724b7659c94c145b9b662ee52 commit: 547bdf84d94ecfcca5aa09cc2ebd6d1e8fc455ac Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Jan 30 17:03:40 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Jan 30 17:03:40 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=547bdf84 kde-frameworks/kxmlgui: Fix Qt5 app artifacts w/ kcheckaccelerators Fixes long-standing bug in applications under Plasma-5 not linking to KXmlGui, as seen in QtCreator and Clementine e.g. KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=337491 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/kxmlgui-5.54.0-kcheckaccelerators.patch | 79 ++++++++++++++++++++++ kde-frameworks/kxmlgui/kxmlgui-5.54.0-r1.ebuild | 54 +++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/kde-frameworks/kxmlgui/files/kxmlgui-5.54.0-kcheckaccelerators.patch b/kde-frameworks/kxmlgui/files/kxmlgui-5.54.0-kcheckaccelerators.patch new file mode 100644 index 00000000000..0882d5f09f9 --- /dev/null +++ b/kde-frameworks/kxmlgui/files/kxmlgui-5.54.0-kcheckaccelerators.patch @@ -0,0 +1,79 @@ +From 02b523bad09aab062355e46771889b0f3709692f Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sat, 12 Jan 2019 18:39:33 +0100 +Subject: Make KCheckAccelerators less invasive for apps that don't directly + link to KXmlGui + +Summary: BUGS: 337491 + +Test Plan: +Ran qtcreator and it no longer has the & in Details +Added some debug and checked that okular still gets the code called + +Reviewers: anthonyfieroni + +Reviewed By: anthonyfieroni + +Subscribers: davidedmundson, anthonyfieroni, kde-frameworks-devel + +Tags: #frameworks + +Differential Revision: https://phabricator.kde.org/D18204 +--- + src/kcheckaccelerators.cpp | 38 ++++++++++++++++++++++++++++++++++++-- + 1 file changed, 36 insertions(+), 2 deletions(-) + +diff --git a/src/kcheckaccelerators.cpp b/src/kcheckaccelerators.cpp +index 13fc012..e08447d 100644 +--- a/src/kcheckaccelerators.cpp ++++ b/src/kcheckaccelerators.cpp +@@ -80,10 +80,44 @@ public Q_SLOTS: + + static void startupFunc() + { +- // Call initiateIfNeeded once we're in the event loop +- // This is to prevent using KSharedConfig before main() can set the app name ++ // Static because in some cases this is called multiple times ++ // but if an application had any of the bad cases we always want ++ // to skip the check ++ static bool doCheckAccelerators = true; ++ ++ if (!doCheckAccelerators) { ++ return; ++ } ++ + QCoreApplication *app = QCoreApplication::instance(); ++ if (!app) { ++ // We're being loaded by something that doesn't have a QCoreApplication ++ // this would probably crash at some later point since we do use qApp-> ++ // quite a lot, so skip the magic ++ doCheckAccelerators = false; ++ return; ++ } ++ ++ if (!QCoreApplication::startingUp()) { ++ // If the app has already started, this means we're not being run as part of ++ // qt_call_pre_routines, which most probably means that we're being run as part ++ // of KXmlGui being loaded as part of some plugin of the app, so don't ++ // do any magic ++ doCheckAccelerators = false; ++ return; ++ } ++ ++ if (!QCoreApplication::eventDispatcher()) { ++ // We are called with event dispatcher being null when KXmlGui is being loaded ++ // through plasma-integration instead of being linked to the app (i.e. QtCreator vs Okular) ++ // For apps that don't link directly to KXmlGui do not do the accelerator magic ++ doCheckAccelerators = false; ++ return; ++ } ++ + KCheckAcceleratorsInitializer *initializer = new KCheckAcceleratorsInitializer(app); ++ // Call initiateIfNeeded once we're in the event loop ++ // This is to prevent using KSharedConfig before main() can set the app name + QMetaObject::invokeMethod(initializer, "initiateIfNeeded", Qt::QueuedConnection); + } + +-- +cgit v1.1 + diff --git a/kde-frameworks/kxmlgui/kxmlgui-5.54.0-r1.ebuild b/kde-frameworks/kxmlgui/kxmlgui-5.54.0-r1.ebuild new file mode 100644 index 00000000000..eac5c3cc9e2 --- /dev/null +++ b/kde-frameworks/kxmlgui/kxmlgui-5.54.0-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Framework for managing menu and toolbar actions in an abstract way" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +LICENSE="LGPL-2+" +IUSE="attica" + +# slot op: includes QtCore/private/qlocale_p.h +RDEPEND=" + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kglobalaccel) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kitemviews) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_qt_dep qtcore '' '' '5=') + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork 'ssl') + $(add_qt_dep qtprintsupport) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtxml) + attica? ( $(add_frameworks_dep attica) ) +" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}/${P}-kcheckaccelerators.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package attica KF5Attica) + ) + + kde5_src_configure +} + +src_test() { + # Files are missing; whatever. Bugs 650290, 668198 + local myctestargs=( + -E "(ktoolbar_unittest|kxmlgui_unittest)" + ) + + kde5_src_test +}