diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-04-08 12:44:11 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-04-08 12:47:12 +0200 |
commit | 3f0b2caa2ee9f9f9f102d551f39bb632ec9f8652 (patch) | |
tree | f2e7b73169a778499f1551ea26ac254019a7af94 /kde-plasma | |
parent | sys-kernel/linux-headers: restore keywords for 4.16 (diff) | |
download | gentoo-3f0b2caa2ee9f9f9f102d551f39bb632ec9f8652.tar.gz gentoo-3f0b2caa2ee9f9f9f102d551f39bb632ec9f8652.tar.bz2 gentoo-3f0b2caa2ee9f9f9f102d551f39bb632ec9f8652.zip |
kde-plasma/plasma-integration: Fix initial remote dir selection
Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'kde-plasma')
-rw-r--r-- | kde-plasma/plasma-integration/files/plasma-integration-5.12.4-remote-dir-selection.patch | 62 | ||||
-rw-r--r-- | kde-plasma/plasma-integration/plasma-integration-5.12.4-r1.ebuild | 45 |
2 files changed, 107 insertions, 0 deletions
diff --git a/kde-plasma/plasma-integration/files/plasma-integration-5.12.4-remote-dir-selection.patch b/kde-plasma/plasma-integration/files/plasma-integration-5.12.4-remote-dir-selection.patch new file mode 100644 index 000000000000..a3c6d931e2b7 --- /dev/null +++ b/kde-plasma/plasma-integration/files/plasma-integration-5.12.4-remote-dir-selection.patch @@ -0,0 +1,62 @@ +From bfd41a95530f90ee8d44cbcfd1fa8c62978334a2 Mon Sep 17 00:00:00 2001 +From: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> +Date: Sun, 8 Apr 2018 11:06:32 +0100 +Subject: KDEPlatformFileDialog: Fix initial directory selection for remote + files + +Summary: +Previously KDEPlatformFileDialogHelper::selectFile() would change +options()->initialDirectory() unconditionally even if it was already +set by the QFileDialog code. Since Qt 5.7.1 it is no longer necessary +to derive initialDirectory from the selectFile() call. In fact it is +actuall harmful since it will now override the correct initial directory +that was set by Qt. Without this patch I got the following debug output: + +``` +KDEPlatformFileDialogHelper::setDirectory QUrl("sftp://server/home/alr48/cheri/build_sdk.sh") +KDEPlatformFileDialogHelper::setDirectory QUrl("sftp://server/home/alr48/cheri/build_sdk.sh") +KDEPlatformFileDialogHelper::selectFile QUrl("file:///home/alex/build_sdk.sh") +KDEPlatformFileDialogHelper::setDirectory QUrl("file:///home/alex/) +``` +The final setDirectory() call is actually a call to +`setDirectory(options->initialDirectory())` which was set in `selectFile()`. + +We now depend on Qt 5.9 so we can remove this code without a check for +version >= 5.7.1. + +BUG: 374913 + +Test Plan: Remote directory is now opened correctly (tested with Qt 5.10.0) + +Reviewers: #plasma, elvisangelaccio + +Reviewed By: elvisangelaccio + +Subscribers: ngraham, krzyc, anthonyfieroni, elvisangelaccio, graesslin, plasma-devel + +Tags: #plasma + +Differential Revision: https://phabricator.kde.org/D4193 +--- + src/platformtheme/kdeplatformfiledialoghelper.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp +index 1a2b1b5..d4ea0cd 100644 +--- a/src/platformtheme/kdeplatformfiledialoghelper.cpp ++++ b/src/platformtheme/kdeplatformfiledialoghelper.cpp +@@ -409,11 +409,6 @@ QUrl KDEPlatformFileDialogHelper::directory() const + void KDEPlatformFileDialogHelper::selectFile(const QUrl &filename) + { + m_dialog->selectFile(filename); +- +- // Qt 5 at least <= 5.8.0 does not derive the directory from the passed url +- // and set the initialDirectory option accordingly, also not for known schemes +- // like file://, so we have to do it ourselves +- options()->setInitialDirectory(m_dialog->directory()); + } + + void KDEPlatformFileDialogHelper::setDirectory(const QUrl &directory) +-- +cgit v0.11.2 + diff --git a/kde-plasma/plasma-integration/plasma-integration-5.12.4-r1.ebuild b/kde-plasma/plasma-integration/plasma-integration-5.12.4-r1.ebuild new file mode 100644 index 000000000000..d9391f82d7d3 --- /dev/null +++ b/kde-plasma/plasma-integration/plasma-integration-5.12.4-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Qt Platform Theme integration plugins for the Plasma workspaces" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="" + +DEPEND=" + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kio) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep knotifications) + $(add_frameworks_dep kwayland) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_frameworks_dep kxmlgui) + $(add_plasma_dep breeze) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui 'dbus' '' '5=') + $(add_qt_dep qtquickcontrols2) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtx11extras) + x11-libs/libXcursor + x11-libs/libxcb +" +RDEPEND="${DEPEND} + media-fonts/hack + media-fonts/noto +" + +# requires running kde environment +RESTRICT+=" test" + +PATCHES=( "${FILESDIR}/${P}-remote-dir-selection.patch" ) |