[SCM] kio packaging branch, kubuntu_unstable, updated. f141f8ac08103657f84875d602d1da5c10829662
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Thu Feb 19 15:34:30 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kio.git;a=commitdiff;h=f141f8a
The following commit has been merged in the kubuntu_unstable branch:
commit f141f8ac08103657f84875d602d1da5c10829662
Author: Harald Sitter <sitter at kde.org>
Date: Thu Feb 19 16:34:26 2015 +0100
add temporary patch from upstream review 122613 until it gets a shipit
---
debian/patches/series | 1 +
.../patches/upstream-almost_kurlcomboslash.patch | 117 +++++++++++++++++++++
2 files changed, 118 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..0a1e4ba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream-almost_kurlcomboslash.patch
diff --git a/debian/patches/upstream-almost_kurlcomboslash.patch b/debian/patches/upstream-almost_kurlcomboslash.patch
new file mode 100644
index 0000000..ce36359
--- /dev/null
+++ b/debian/patches/upstream-almost_kurlcomboslash.patch
@@ -0,0 +1,117 @@
+diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
+index f613c1a..e8ad0ff 100644
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -70,6 +70,7 @@ if (TARGET KF5::KIOFileWidgets)
+ include_directories(${CMAKE_SOURCE_DIR}/src/filewidgets ${CMAKE_BINARY_DIR}/src/filewidgets)
+ ecm_add_tests(
+ kurlnavigatortest.cpp
++ kurlcomboboxtest.cpp
+ kdiroperatortest.cpp
+ knewfilemenutest.cpp
+ kfilecopytomenutest.cpp
+diff --git a/autotests/kurlcomboboxtest.h b/autotests/kurlcomboboxtest.h
+new file mode 100644
+index 0000000..6f0e9be
+--- /dev/null
++++ b/autotests/kurlcomboboxtest.h
+@@ -0,0 +1,35 @@
++/***************************************************************************
++ * Copyright (C) 2015 by Alejandro Fiestas Olivares <afiestas at kde.org *
++ * *
++ * This program is free software; you can redistribute it and/or modify *
++ * it under the terms of the GNU General Public License as published by *
++ * the Free Software Foundation; either version 2 of the License, or *
++ * (at your option) any later version. *
++ * *
++ * This program is distributed in the hope that it will be useful, *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
++ * GNU General Public License for more details. *
++ * *
++ * You should have received a copy of the GNU General Public License *
++ * along with this program; if not, write to the *
++ * Free Software Foundation, Inc., *
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
++ ***************************************************************************/
++
++#ifndef KURLCOMBOBOXTEST_H
++#define KURLCOMBOBOXTEST_H
++
++#include <QObject>
++
++class KUrlComboBoxTest : public QObject
++{
++ Q_OBJECT
++
++private Q_SLOTS:
++ void testTextForItem();
++ void testTextForItem_data();
++};
++
++#endif //KURLCOMBOBOXTEST_H
++
+diff --git a/autotests/kurlcomboboxtest.cpp b/autotests/kurlcomboboxtest.cpp
+new file mode 100644
+index 0000000..b9ab169
+--- /dev/null
++++ b/autotests/kurlcomboboxtest.cpp
+@@ -0,0 +1,45 @@
++/***************************************************************************
++ * Copyright (C) 2015 by Alejandro Fiestas Olivares <afiestas at kde.org *
++ * *
++ * This program is free software; you can redistribute it and/or modify *
++ * it under the terms of the GNU General Public License as published by *
++ * the Free Software Foundation; either version 2 of the License, or *
++ * (at your option) any later version. *
++ * *
++ * This program is distributed in the hope that it will be useful, *
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
++ * GNU General Public License for more details. *
++ * *
++ * You should have received a copy of the GNU General Public License *
++ * along with this program; if not, write to the *
++ * Free Software Foundation, Inc., *
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
++ ***************************************************************************/
++
++#include "kurlcomboboxtest.h"
++#include "kurlcombobox.h"
++
++#include <QtTestWidgets>
++
++QTEST_MAIN(KUrlComboBoxTest)
++
++void KUrlComboBoxTest::testTextForItem_data()
++{
++ QTest::addColumn<QString>("url");
++ QTest::addColumn<QString>("expectedText");
++
++ QTest::newRow("with_host") << "ftp://foo.com/folder" << "ftp://foo.com/folder/";
++ QTest::newRow("with_no_host") << "smb://" << "smb://";
++}
++
++void KUrlComboBoxTest::testTextForItem()
++{
++ QFETCH(QString, url);
++ QFETCH(QString, expectedText);
++
++ KUrlComboBox combo(KUrlComboBox::Directories);
++ combo.setUrl(QUrl(url));
++
++ QCOMPARE(combo.itemText(0), expectedText);
++}
+diff --git a/src/widgets/kurlcombobox.cpp b/src/widgets/kurlcombobox.cpp
+index ed5b8a2..75d9f17 100644
+--- a/src/widgets/kurlcombobox.cpp
++++ b/src/widgets/kurlcombobox.cpp
+@@ -81,7 +81,7 @@ QString KUrlComboBoxPrivate::textForItem(const KUrlComboItem *item) const
+ QString text;
+ QUrl url = item->url;
+ if (myMode == KUrlComboBox::Directories) {
+- if (!url.path().endsWith(QLatin1Char('/'))) {
++ if (!url.host().isEmpty() && !url.path().endsWith(QLatin1Char('/'))) {
+ url.setPath(url.path() + QLatin1Char('/'));
+ }
+ } else {
--
kio packaging
More information about the pkg-kde-commits
mailing list