Accepting request 240395 from KDE:Frameworks5

Define kf5_version within package

OBS-URL: https://build.opensuse.org/request/show/240395
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kio?expand=0&rev=6
This commit is contained in:
Stephan Kulow 2014-07-17 15:31:24 +00:00 committed by Git OBS Bridge
commit 5cadfd210b
8 changed files with 270 additions and 33 deletions

View File

@ -0,0 +1,48 @@
From c0217c6e5e1e7592fcd0d808f1766e8be6289db0 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Fri, 4 Jul 2014 22:59:48 +0200
Subject: [PATCH 04/10] When executing commands set the working directory to be
the current directory
if not specified by the service.
Forward port commit 89d4585 by Dawit which fixes #142597.
+ fix path() to toLocalFile().
REVIEW: 119020
---
src/widgets/krun.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/widgets/krun.cpp b/src/widgets/krun.cpp
index 77708a0..bc39d83 100644
--- a/src/widgets/krun.cpp
+++ b/src/widgets/krun.cpp
@@ -176,7 +176,8 @@ bool KRun::runUrl(const QUrl &u, const QString &_mimetype, QWidget *window, bool
} else if (isExecutableFile(u, _mimetype)) {
if (u.isLocalFile() && runExecutables) {
if (KAuthorized::authorize("shell_access")) {
- return (KRun::runCommand(KShell::quoteArg(u.toLocalFile()), QString(), QString(), window, asn, u.adjusted(QUrl::RemoveFilename).path())); // just execute the url as a command
+ return (KRun::runCommand(KShell::quoteArg(u.toLocalFile()), QString(), QString(),
+ window, asn, u.adjusted(QUrl::RemoveFilename).toLocalFile())); // just execute the url as a command
// ## TODO implement deleting the file if tempFile==true
} else {
noAuth = true;
@@ -426,8 +427,13 @@ static bool runTempService(const KService &_service, const QList<QUrl> &_urls, Q
}
//qDebug() << "runTempService: KProcess args=" << args;
+ QString path(_service.path());
+ if (path.isEmpty() && !_urls.isEmpty() && _urls.first().isLocalFile()) {
+ path = _urls.first().adjusted(QUrl::RemoveFilename).toLocalFile();
+ }
+
return runCommandInternal(args.join(" "), &_service, KIO::DesktopExecParser::executablePath(_service.exec()),
- _service.name(), _service.icon(), window, asn, _service.path());
+ _service.name(), _service.icon(), window, asn, path);
}
// WARNING: don't call this from DesktopExecParser, since klauncher uses that too...
--
2.0.0

View File

@ -0,0 +1,54 @@
From c42e52d366ffcc016a487627b935b34183af759a Mon Sep 17 00:00:00 2001
From: Eike Hein <hein@kde.org>
Date: Sat, 5 Jul 2014 20:52:52 +0200
Subject: [PATCH 05/10] Fix template discovery in KNewFileMenu.
Incorrect port to QStandardPaths was collecting dirs instead of
files within them.
Reviewed-By: David Faure
REVIEW:119130
---
src/filewidgets/knewfilemenu.cpp | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/filewidgets/knewfilemenu.cpp b/src/filewidgets/knewfilemenu.cpp
index 4f1ca10..a24ac9c 100644
--- a/src/filewidgets/knewfilemenu.cpp
+++ b/src/filewidgets/knewfilemenu.cpp
@@ -841,10 +841,12 @@ void KNewFileMenuPrivate::_k_slotFillTemplates()
{
KNewFileMenuSingleton *s = kNewMenuGlobals();
//qDebug();
+
+ const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "templates", QStandardPaths::LocateDirectory);
+
// Ensure any changes in the templates dir will call this
if (! s->dirWatch) {
s->dirWatch = new KDirWatch;
- const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "templates", QStandardPaths::LocateDirectory);
for (QStringList::const_iterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) {
//qDebug() << "Templates resource dir:" << *it;
s->dirWatch->addDir(*it);
@@ -863,7 +865,17 @@ void KNewFileMenuPrivate::_k_slotFillTemplates()
s->templatesList->clear();
// Look into "templates" dirs.
- const QStringList files = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "templates", QStandardPaths::LocateDirectory);
+ QStringList files;
+ QDir dir;
+
+ Q_FOREACH (const QString &path, dirs) {
+ dir.setPath(path);
+ const QStringList &entryList(dir.entryList(QStringList() << "*.desktop", QDir::Files));
+ Q_FOREACH (const QString &entry, entryList) {
+ files.append(dir.path() + dir.separator() + entry);
+ }
+ }
+
QMap<QString, KNewFileMenuSingleton::Entry> slist; // used for sorting
Q_FOREACH (const QString &file, files) {
//qDebug() << file;
--
2.0.0

View File

@ -0,0 +1,77 @@
From bffdd7fa0c03f255bded5071e39f50c768891eca Mon Sep 17 00:00:00 2001
From: Harald Sitter <sitter@kde.org>
Date: Tue, 8 Jul 2014 11:45:04 -0400
Subject: [PATCH 07/10] fix kurlrequester dialog accept handling
switch to qdialog::accepted signal, rename slot (on private class) and
remove accepted check in slot
BUG: 337226
REVIEW: 119174
---
src/widgets/kurlrequester.cpp | 16 +++++++---------
src/widgets/kurlrequester.h | 2 +-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/widgets/kurlrequester.cpp b/src/widgets/kurlrequester.cpp
index bc40284..cf0b0c7 100644
--- a/src/widgets/kurlrequester.cpp
+++ b/src/widgets/kurlrequester.cpp
@@ -213,7 +213,7 @@ public:
// slots
void _k_slotUpdateUrl();
void _k_slotOpenDialog();
- void _k_slotFileDialogFinished();
+ void _k_slotFileDialogAccepted();
QUrl m_startDir;
KUrlRequester *m_parent; // TODO: rename to 'q'
@@ -408,18 +408,16 @@ void KUrlRequester::KUrlRequesterPrivate::_k_slotOpenDialog()
}
}
-void KUrlRequester::KUrlRequesterPrivate::_k_slotFileDialogFinished()
+void KUrlRequester::KUrlRequesterPrivate::_k_slotFileDialogAccepted()
{
if (!myFileDialog) {
return;
}
- if (myFileDialog->result() == QDialog::Accepted) {
- QUrl newUrl = myFileDialog->selectedUrls().first();
- if (newUrl.isValid()) {
- m_parent->setUrl(newUrl);
- emit m_parent->urlSelected(url());
- }
+ QUrl newUrl = myFileDialog->selectedUrls().first();
+ if (newUrl.isValid()) {
+ m_parent->setUrl(newUrl);
+ emit m_parent->urlSelected(url());
}
}
@@ -466,7 +464,7 @@ QFileDialog *KUrlRequester::fileDialog() const
d->applyFileMode(d->myFileDialog, d->fileDialogMode);
d->myFileDialog->setWindowModality(d->fileDialogModality);
- connect(d->myFileDialog, SIGNAL(finished()), SLOT(_k_slotFileDialogFinished()));
+ connect(d->myFileDialog, SIGNAL(accepted()), SLOT(_k_slotFileDialogAccepted()));
}
return d->myFileDialog;
diff --git a/src/widgets/kurlrequester.h b/src/widgets/kurlrequester.h
index 528cffc..163c435 100644
--- a/src/widgets/kurlrequester.h
+++ b/src/widgets/kurlrequester.h
@@ -328,7 +328,7 @@ private:
Q_PRIVATE_SLOT(d, void _k_slotUpdateUrl())
Q_PRIVATE_SLOT(d, void _k_slotOpenDialog())
- Q_PRIVATE_SLOT(d, void _k_slotFileDialogFinished())
+ Q_PRIVATE_SLOT(d, void _k_slotFileDialogAccepted())
};
--
2.0.0

View File

@ -0,0 +1,28 @@
From cf430d82c09978d4d9e43e90f6bc60e2a2900942 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Tue, 8 Jul 2014 17:48:23 +0200
Subject: [PATCH 08/10] warn about asserting when people can't write proper
desktop files
Tested by Eike Hein with mpv's desktop file.
---
src/core/desktopexecparser.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/desktopexecparser.cpp b/src/core/desktopexecparser.cpp
index 085643d..be62791 100644
--- a/src/core/desktopexecparser.cpp
+++ b/src/core/desktopexecparser.cpp
@@ -176,7 +176,8 @@ QStringList KIO::DesktopExecParser::supportedProtocols(const KService &service)
KRunMX1 mx1(service);
QString exec = service.exec();
if (mx1.expandMacrosShellQuote(exec) && !mx1.hasUrls) {
- Q_ASSERT(supportedProtocols.isEmpty()); // huh? If you support protocols you need %u or %U...
+ qWarning() << service.entryPath() << "contains a X-KDE-Protocols line but doesn't use %u or %U in its Exec line! This is inconsistent.";
+ return QStringList();
} else {
if (supportedProtocols.isEmpty()) {
// compat mode: assume KIO if not set and it's a KDE app (or a KDE service)
--
2.0.0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2fb7e896fefe3c4650d7fdaad513c2f103fdf4f5005af811596573de91a0ea5f
size 2553204

3
kio-5.0.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:652c258fcb96d0b7bfecaa1dfef8b502f43b0dd01c3fe110cdb312eafb12f62f
size 2538568

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Fri Jul 11 09:48:45 UTC 2014 - hrvoje.senjan@gmail.com
- Define kf5_version within package
- Added patches from upstream:
0004-When-executing-commands-set-the-working-directory-to.patch,
0005-Fix-template-discovery-in-KNewFileMenu.patch,
0007-fix-kurlrequester-dialog-accept-handling.patch and
0008-warn-about-asserting-when-people-can-t-write-proper-.patch
-------------------------------------------------------------------
Tue Jul 1 21:36:04 UTC 2014 - hrvoje.senjan@gmail.com
- Update to 5.0.0
* Final release of KDE Frameworks 5
* API improvements and cleanups
* Buildsystem fixes
* For more details please see:
http://www.kde.org/announcements/kde-frameworks-5.0.php
-------------------------------------------------------------------
Sun Jun 1 18:02:30 UTC 2014 - hrvoje.senjan@gmail.com

View File

@ -17,36 +17,37 @@
Name: kio
Version: 4.100.0
Version: 5.0.0
Release: 0
%define kf5_version %{version}
BuildRequires: cmake >= 2.8.12
BuildRequires: extra-cmake-modules >= 0.0.14
BuildRequires: extra-cmake-modules >= 1.0.0
BuildRequires: fdupes
BuildRequires: karchive-devel >= %{_kf5_version}
BuildRequires: kbookmarks-devel >= %{_kf5_version}
BuildRequires: kcompletion-devel >= %{_kf5_version}
BuildRequires: kconfigwidgets-devel >= %{_kf5_version}
BuildRequires: kcoreaddons-devel >= %{_kf5_version}
BuildRequires: kcrash-devel >= %{_kf5_version}
BuildRequires: kdbusaddons-devel >= %{_kf5_version}
BuildRequires: kdoctools-devel >= %{_kf5_version}
BuildRequires: karchive-devel >= %{kf5_version}
BuildRequires: kbookmarks-devel >= %{kf5_version}
BuildRequires: kcompletion-devel >= %{kf5_version}
BuildRequires: kconfigwidgets-devel >= %{kf5_version}
BuildRequires: kcoreaddons-devel >= %{kf5_version}
BuildRequires: kcrash-devel >= %{kf5_version}
BuildRequires: kdbusaddons-devel >= %{kf5_version}
BuildRequires: kdoctools-devel >= %{kf5_version}
BuildRequires: kf5-filesystem
BuildRequires: kguiaddons-devel >= %{_kf5_version}
BuildRequires: ki18n-devel >= %{_kf5_version}
BuildRequires: kiconthemes-devel >= %{_kf5_version}
BuildRequires: kitemviews-devel >= %{_kf5_version}
BuildRequires: kjobwidgets-devel >= %{_kf5_version}
BuildRequires: knotifications-devel >= %{_kf5_version}
BuildRequires: kguiaddons-devel >= %{kf5_version}
BuildRequires: ki18n-devel >= %{kf5_version}
BuildRequires: kiconthemes-devel >= %{kf5_version}
BuildRequires: kitemviews-devel >= %{kf5_version}
BuildRequires: kjobwidgets-devel >= %{kf5_version}
BuildRequires: knotifications-devel >= %{kf5_version}
BuildRequires: krb5-devel
BuildRequires: kservice-devel >= %{_kf5_version}
BuildRequires: ktextwidgets-devel >= %{_kf5_version}
BuildRequires: kwallet-devel >= %{_kf5_version}
BuildRequires: kwidgetsaddons-devel >= %{_kf5_version}
BuildRequires: kwindowsystem-devel >= %{_kf5_version}
BuildRequires: kxmlgui-devel >= %{_kf5_version}
BuildRequires: kservice-devel >= %{kf5_version}
BuildRequires: ktextwidgets-devel >= %{kf5_version}
BuildRequires: kwallet-devel >= %{kf5_version}
BuildRequires: kwidgetsaddons-devel >= %{kf5_version}
BuildRequires: kwindowsystem-devel >= %{kf5_version}
BuildRequires: kxmlgui-devel >= %{kf5_version}
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: solid-devel >= %{_kf5_version}
BuildRequires: solid-devel >= %{kf5_version}
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0
BuildRequires: pkgconfig(Qt5Core) >= 5.2.0
BuildRequires: pkgconfig(Qt5DBus) >= 5.2.0
@ -63,8 +64,13 @@ Summary: Network transparent access to files and data
License: LGPL-2.1+
Group: System/GUI/KDE
Url: http://www.kde.org
Source: http://download.kde.org/unstable/frameworks/%{version}/%{name}-%{version}.tar.xz
Source: http://download.kde.org/stable/frameworks/%{version}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAMS
Patch1: 0004-When-executing-commands-set-the-working-directory-to.patch
Patch2: 0005-Fix-template-discovery-in-KNewFileMenu.patch
Patch3: 0007-fix-kurlrequester-dialog-accept-handling.patch
Patch4: 0008-warn-about-asserting-when-people-can-t-write-proper-.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -77,12 +83,12 @@ Summary: Network transparent access to files and data
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
Requires: extra-cmake-modules
Requires: kbookmarks-devel >= %{_kf5_version}
Requires: kcompletion-devel >= %{_kf5_version}
Requires: kjobwidgets-devel >= %{_kf5_version}
Requires: kservice-devel >= %{_kf5_version}
Requires: kxmlgui-devel >= %{_kf5_version}
Requires: solid-devel >= %{_kf5_version}
Requires: kbookmarks-devel >= %{kf5_version}
Requires: kcompletion-devel >= %{kf5_version}
Requires: kjobwidgets-devel >= %{kf5_version}
Requires: kservice-devel >= %{kf5_version}
Requires: kxmlgui-devel >= %{kf5_version}
Requires: solid-devel >= %{kf5_version}
Requires: pkgconfig(Qt5Network) >= 5.2.0
%description devel
@ -94,6 +100,10 @@ Development files.
%lang_package
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%cmake_kf5 -d build