public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/kde:master commit in: kde-frameworks/kparts/files/, kde-frameworks/kparts/
@ 2016-09-14 14:13 Michael Palimaka
  0 siblings, 0 replies; only message in thread
From: Michael Palimaka @ 2016-09-14 14:13 UTC (permalink / raw
  To: gentoo-commits

commit:     44daaab14c816c52dd6bfdee9cc170f11ef991c0
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sun Sep 11 17:32:30 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 14:13:12 2016 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=44daaab1

kde-frameworks/kparts: Fix detection of URLs with trailing slashes

Package-Manager: portage-2.3.0

 .../files/kparts-5.26.0-misdetected-dirs.patch     | 62 ++++++++++++++++++++++
 kde-frameworks/kparts/kparts-5.26.0-r1.ebuild      | 33 ++++++++++++
 2 files changed, 95 insertions(+)

diff --git a/kde-frameworks/kparts/files/kparts-5.26.0-misdetected-dirs.patch b/kde-frameworks/kparts/files/kparts-5.26.0-misdetected-dirs.patch
new file mode 100644
index 0000000..269f6db
--- /dev/null
+++ b/kde-frameworks/kparts/files/kparts-5.26.0-misdetected-dirs.patch
@@ -0,0 +1,62 @@
+From: David Faure <faure@kde.org>
+Date: Tue, 06 Sep 2016 15:53:48 +0000
+Subject: Fix URLs with a trailing slash being always assumed to be directories.
+X-Git-Url: http://quickgit.kde.org/?p=kparts.git&a=commitdiff&h=7d99562257cc44f63fff32a160810d9c0d7dda4c
+---
+Fix URLs with a trailing slash being always assumed to be directories.
+
+Testcase: `konqueror gopher://gopher.quux.org/1/`
+
+QMimeDatabase can't differenciate between KIO protocols, so we do it here.
+---
+
+
+--- a/src/browserrun.cpp
++++ b/src/browserrun.cpp
+@@ -113,21 +113,23 @@
+ 
+ void BrowserRun::scanFile()
+ {
+-    // qDebug() << KRun::url();
++    const QUrl url = KRun::url();
++    // qDebug() << url;
+ 
+     // Let's check for well-known extensions
+     // Not when there is a query in the URL, in any case.
+     // Optimization for http/https, findByURL doesn't trust extensions over http.
+-    QString protocol = KRun::url().scheme();
++    QString protocol = url.scheme();
+ 
+     if (!KProtocolInfo::proxiedBy(protocol).isEmpty()) {
+         QString dummy;
+-        protocol = KProtocolManager::slaveProtocol(KRun::url(), dummy);
+-    }
+-
+-    if (!KRun::url().hasQuery() && !protocol.startsWith(QLatin1String("http"))) {
++        protocol = KProtocolManager::slaveProtocol(url, dummy);
++    }
++
++    if (!url.hasQuery() && !protocol.startsWith(QLatin1String("http")) &&
++           (!url.path().endsWith(QLatin1Char('/')) || KProtocolManager::supportsListing(url))) {
+         QMimeDatabase db;
+-        QMimeType mime = db.mimeTypeForUrl(KRun::url());
++        QMimeType mime = db.mimeTypeForUrl(url);
+         if (!mime.isDefault() || isLocalFile()) {
+             // qDebug() << "MIME TYPE is" << mime.name();
+             mimeTypeDetermined(mime.name());
+@@ -155,11 +157,11 @@
+     }
+ 
+     KIO::TransferJob *job;
+-    if (d->m_browserArgs.doPost() && KRun::url().scheme().startsWith(QLatin1String("http"))) {
+-        job = KIO::http_post(KRun::url(), d->m_browserArgs.postData, KIO::HideProgressInfo);
++    if (d->m_browserArgs.doPost() && url.scheme().startsWith(QLatin1String("http"))) {
++        job = KIO::http_post(url, d->m_browserArgs.postData, KIO::HideProgressInfo);
+         job->addMetaData(QStringLiteral("content-type"), d->m_browserArgs.contentType());
+     } else {
+-        job = KIO::get(KRun::url(),
++        job = KIO::get(url,
+                        d->m_args.reload() ? KIO::Reload : KIO::NoReload,
+                        KIO::HideProgressInfo);
+     }
+

diff --git a/kde-frameworks/kparts/kparts-5.26.0-r1.ebuild b/kde-frameworks/kparts/kparts-5.26.0-r1.ebuild
new file mode 100644
index 0000000..31e4420
--- /dev/null
+++ b/kde-frameworks/kparts/kparts-5.26.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Framework providing elaborate user-interface components"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+"
+DEPEND="${RDEPEND}
+	$(add_frameworks_dep ktextwidgets)
+"
+
+PATCHES=( "${FILESDIR}/${P}-misdetected-dirs.patch" )


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-14 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 14:13 [gentoo-commits] proj/kde:master commit in: kde-frameworks/kparts/files/, kde-frameworks/kparts/ Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox