Accepting request 440076 from home:wolfi323:test
- Add Look-for-both-json-and-desktop-metadata.patch to fix adding a panel or plasmoid with the new json metadata files OBS-URL: https://build.opensuse.org/request/show/440076 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=277
This commit is contained in:
parent
45aa4bd75c
commit
04e52ea545
80
Look-for-both-json-and-desktop-metadata.patch
Normal file
80
Look-for-both-json-and-desktop-metadata.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From: Aleix Pol <aleixpol@kde.org>
|
||||||
|
Date: Mon, 31 Oct 2016 11:06:30 +0000
|
||||||
|
Subject: Make sure we're looking both for json and desktop metadata
|
||||||
|
X-Git-Url: http://quickgit.kde.org/?p=plasma-workspace.git&a=commitdiff&h=bfb91f9de153d53a30d82ad6ce0d6732da4ab367
|
||||||
|
---
|
||||||
|
Make sure we're looking both for json and desktop metadata
|
||||||
|
|
||||||
|
We shouldn't assume metadata is in metadata.desktop
|
||||||
|
|
||||||
|
REVIEW: 129276
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
--- a/shell/containmentconfigview.cpp
|
||||||
|
+++ b/shell/containmentconfigview.cpp
|
||||||
|
@@ -141,8 +141,8 @@
|
||||||
|
QStringList packages;
|
||||||
|
|
||||||
|
foreach (const QString &sdir, dir.entryList(QDir::AllDirs | QDir::Readable)) {
|
||||||
|
- QString metadata = dirPath + '/' + sdir + "/metadata.desktop";
|
||||||
|
- if (QFile::exists(metadata)) {
|
||||||
|
+ const QString metadata = dirPath + '/' + sdir;
|
||||||
|
+ if (QFile::exists(metadata + "/metadata.json") || QFile::exists(metadata + "/metadata.desktop")) {
|
||||||
|
packages << sdir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- a/shell/scripting/scriptengine_v1.cpp
|
||||||
|
+++ b/shell/scripting/scriptengine_v1.cpp
|
||||||
|
@@ -510,6 +510,11 @@
|
||||||
|
if (sc) {
|
||||||
|
const QString overridePackagePath = sc->lookAndFeelPackage().path() + QStringLiteral("contents/layouts/") + pluginData.pluginId();
|
||||||
|
|
||||||
|
+ path = overridePackagePath + QStringLiteral("/metadata.json");
|
||||||
|
+ if (QFile::exists(path)) {
|
||||||
|
+ package.setPath(overridePackagePath);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
path = overridePackagePath + QStringLiteral("/metadata.desktop");
|
||||||
|
if (QFile::exists(path)) {
|
||||||
|
package.setPath(overridePackagePath);
|
||||||
|
@@ -518,7 +523,10 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!package.isValid()) {
|
||||||
|
- path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, package.defaultPackageRoot() + pluginData.pluginId() + "/metadata.desktop");
|
||||||
|
+ path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, package.defaultPackageRoot() + pluginData.pluginId() + "/metadata.json");
|
||||||
|
+ if (path.isEmpty()) {
|
||||||
|
+ path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, package.defaultPackageRoot() + pluginData.pluginId() + "/metadata.desktop");
|
||||||
|
+ }
|
||||||
|
if (path.isEmpty()) {
|
||||||
|
// qDebug() << "script path is empty";
|
||||||
|
return false;
|
||||||
|
|
||||||
|
--- a/wallpapers/image/backgroundlistmodel.cpp
|
||||||
|
+++ b/wallpapers/image/backgroundlistmodel.cpp
|
||||||
|
@@ -559,7 +559,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString filePath = wp.filePath();
|
||||||
|
- if (QFile::exists(filePath + QString::fromLatin1("/metadata.desktop"))) {
|
||||||
|
+ if (QFile::exists(filePath + QString::fromLatin1("/metadata.desktop")) || QFile::exists(filePath + QString::fromLatin1("/metadata.json"))) {
|
||||||
|
package.setPath(filePath);
|
||||||
|
if (package.isValid()) {
|
||||||
|
if (!package.filePath("images").isEmpty()) {
|
||||||
|
|
||||||
|
--- a/wallpapers/image/image.cpp
|
||||||
|
+++ b/wallpapers/image/image.cpp
|
||||||
|
@@ -453,7 +453,9 @@
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//if it's not an absolute path, check if it's just a wallpaper name
|
||||||
|
- const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + QString(m_wallpaper + QString::fromLatin1("/metadata.desktop")));
|
||||||
|
+ QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + QString(m_wallpaper + QString::fromLatin1("/metadata.json")));
|
||||||
|
+ if (path.isEmpty())
|
||||||
|
+ path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + QString(m_wallpaper + QString::fromLatin1("/metadata.desktop")));
|
||||||
|
|
||||||
|
if (!path.isEmpty()) {
|
||||||
|
QDir dir(path);
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 12 21:03:18 UTC 2016 - wbauer@tmo.at
|
||||||
|
|
||||||
|
- Add Look-for-both-json-and-desktop-metadata.patch to fix adding a
|
||||||
|
panel or plasmoid with the new json metadata files
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 10 12:12:45 UTC 2016 - fabian@ritter-vogt.de
|
Thu Nov 10 12:12:45 UTC 2016 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
@ -55,6 +55,8 @@ Patch104: 0003-Sync-app-config-in-sync-with-applets-config.patch
|
|||||||
Patch105: 0004-Avoid-connecting-to-screen-changed-signals-twice.patch
|
Patch105: 0004-Avoid-connecting-to-screen-changed-signals-twice.patch
|
||||||
# PATCH-FIX-UPSTREAM 0005-Load-screenpool-at-the-same-time-as-we-connect-to-sc.patch kde@davidedmundson.co.uk -- Load screenpool at the same time as we connect to screenchanged signals
|
# PATCH-FIX-UPSTREAM 0005-Load-screenpool-at-the-same-time-as-we-connect-to-sc.patch kde@davidedmundson.co.uk -- Load screenpool at the same time as we connect to screenchanged signals
|
||||||
Patch106: 0005-Load-screenpool-at-the-same-time-as-we-connect-to-sc.patch
|
Patch106: 0005-Load-screenpool-at-the-same-time-as-we-connect-to-sc.patch
|
||||||
|
# PATCH-FIX-UPSTREAM Look-for-both-json-and-desktop-metadata.patch -- Fix adding a panel with the new json metadata files
|
||||||
|
Patch107: Look-for-both-json-and-desktop-metadata.patch
|
||||||
# PATCHES 201-300 and above are from upstream master/5.9 branch
|
# PATCHES 201-300 and above are from upstream master/5.9 branch
|
||||||
BuildRequires: breeze5-icons
|
BuildRequires: breeze5-icons
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -232,6 +234,7 @@ workspace. Development files.
|
|||||||
%patch104 -p1
|
%patch104 -p1
|
||||||
%patch105 -p1
|
%patch105 -p1
|
||||||
%patch106 -p1
|
%patch106 -p1
|
||||||
|
%patch107 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user