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 B24D61382C5 for ; Thu, 28 May 2020 20:21:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AAE55E0822; Thu, 28 May 2020 20:21:03 +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 7DAF5E0822 for ; Thu, 28 May 2020 20:21:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 B86DA34EC82 for ; Thu, 28 May 2020 20:21:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A976D230 for ; Thu, 28 May 2020 20:20:59 +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: <1590697249.ce8934eff28bbe9ccbfd987735944c8f18f893ce.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch kde-apps/konsole/konsole-20.04.1-r1.ebuild X-VCS-Directories: kde-apps/konsole/files/ kde-apps/konsole/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: ce8934eff28bbe9ccbfd987735944c8f18f893ce X-VCS-Branch: master Date: Thu, 28 May 2020 20:20:59 +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: 483ea6d8-562f-475d-8bb0-e9c22a9f6369 X-Archives-Hash: 8e0a24d6311939c27f449454e117261b commit: ce8934eff28bbe9ccbfd987735944c8f18f893ce Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu May 28 20:19:01 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu May 28 20:20:49 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce8934ef kde-apps/konsole: Fix crash on 'Set Encoding' context menu w/ Qt 5.15 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=419526 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner gentoo.org> ...e-20.04.1-qt-5.15-set-text-encoding-crash.patch | 109 +++++++++++++++++++++ kde-apps/konsole/konsole-20.04.1-r1.ebuild | 5 +- 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch b/kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch new file mode 100644 index 00000000000..78e5559d047 --- /dev/null +++ b/kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch @@ -0,0 +1,109 @@ +From 72e76de072aa4c7960396856e72681a00c4f67d9 Mon Sep 17 00:00:00 2001 +From: Ahmad Samir +Date: Thu, 28 May 2020 21:40:29 +0200 +Subject: [PATCH] [SessionController] Fix crash caused by text encoding menu + +QMenu since 5.15 is hidden when an action is triggered, this caused a +crash in Konsole when trying to access the text encoding menu. + +Now Session emits a signal when the text encoding is changed, the +SessionController can connect to that singal to set the current codec in +the KCodecAction object. + +Also fix the EditProfileDialog so that when the KCodecAction menu is +shown the currently set codec is selected. + +BUG: 419526 + +FIXED-IN: 20.08 +--- + src/EditProfileDialog.cpp | 1 + + src/Session.cpp | 2 ++ + src/Session.h | 5 +++++ + src/SessionController.cpp | 7 ++++--- + src/SessionController.h | 2 +- + 5 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp +index a64136934..f93e9e166 100644 +--- a/src/EditProfileDialog.cpp ++++ b/src/EditProfileDialog.cpp +@@ -1725,6 +1725,7 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr &profile) + + // encoding options + auto codecAction = new KCodecAction(this); ++ codecAction->setCurrentCodec(profile->defaultEncoding()); + _advancedUi->selectEncodingButton->setMenu(codecAction->menu()); + connect(codecAction, + QOverload::of(&KCodecAction::triggered), this, +diff --git a/src/Session.cpp b/src/Session.cpp +index 1103f6e1b..483d8fd6a 100644 +--- a/src/Session.cpp ++++ b/src/Session.cpp +@@ -252,6 +252,8 @@ void Session::setCodec(QTextCodec* codec) + } + + emulation()->setCodec(codec); ++ ++ emit sessionCodecChanged(codec); + } + + bool Session::setCodec(const QByteArray& name) +diff --git a/src/Session.h b/src/Session.h +index 1b7da1b3b..c1af3c05d 100644 +--- a/src/Session.h ++++ b/src/Session.h +@@ -661,6 +661,11 @@ Q_SIGNALS: + */ + void currentDirectoryChanged(const QString &dir); + ++ /** ++ * Emitted when the session text encoding changes. ++ */ ++ void sessionCodecChanged(QTextCodec *codec); ++ + /** Emitted when a bell event occurs in the session. */ + void bellRequest(const QString &message); + +diff --git a/src/SessionController.cpp b/src/SessionController.cpp +index e72f342c4..f74969f85 100644 +--- a/src/SessionController.cpp ++++ b/src/SessionController.cpp +@@ -691,7 +691,8 @@ void SessionController::setupCommonActions() + _codecAction = new KCodecAction(i18n("Set &Encoding"), this); + _codecAction->setIcon(QIcon::fromTheme(QStringLiteral("character-set"))); + collection->addAction(QStringLiteral("set-encoding"), _codecAction); +- connect(_codecAction->menu(), &QMenu::aboutToShow, this, &Konsole::SessionController::updateCodecAction); ++ _codecAction->setCurrentCodec(QString::fromUtf8(_session->codec())); ++ connect(_session.data(), &Konsole::Session::sessionCodecChanged, this, &Konsole::SessionController::updateCodecAction); + connect(_codecAction, + QOverload::of(&KCodecAction::triggered), this, + &Konsole::SessionController::changeCodec); +@@ -846,9 +847,9 @@ void SessionController::prepareSwitchProfileMenu() + _switchProfileMenu->menu()->clear(); + _switchProfileMenu->menu()->addActions(_profileList->actions()); + } +-void SessionController::updateCodecAction() ++void SessionController::updateCodecAction(QTextCodec *codec) + { +- _codecAction->setCurrentCodec(QString::fromUtf8(_session->codec())); ++ _codecAction->setCurrentCodec(codec); + } + + void SessionController::changeCodec(QTextCodec* codec) +diff --git a/src/SessionController.h b/src/SessionController.h +index 057a31446..5062833b7 100644 +--- a/src/SessionController.h ++++ b/src/SessionController.h +@@ -260,7 +260,7 @@ private Q_SLOTS: + // other + void setupSearchBar(); + void prepareSwitchProfileMenu(); +- void updateCodecAction(); ++ void updateCodecAction(QTextCodec *codec); + void showDisplayContextMenu(const QPoint &position); + void movementKeyFromSearchBarReceived(QKeyEvent *event); + void sessionNotificationsChanged(Session::Notification notification, bool enabled); +-- +2.26.2 + diff --git a/kde-apps/konsole/konsole-20.04.1-r1.ebuild b/kde-apps/konsole/konsole-20.04.1-r1.ebuild index f6870330550..a60f18304f2 100644 --- a/kde-apps/konsole/konsole-20.04.1-r1.ebuild +++ b/kde-apps/konsole/konsole-20.04.1-r1.ebuild @@ -53,7 +53,10 @@ DEPEND=" " RDEPEND="${DEPEND}" -PATCHES=( "${FILESDIR}/${P}-crash-on-close.patch" ) # bug 723214 +PATCHES=( + "${FILESDIR}/${P}-crash-on-close.patch" # bug 723214, in 20.04.2 + "${FILESDIR}/${P}-qt-5.15-set-text-encoding-crash.patch" # KDE-Bug 419526; pending +) src_configure() { local mycmakeargs=(