]>
Commit | Line | Data |
---|---|---|
dcc18eb4 JB |
1 | --- plasma-workspace-5.27.11/CMakeLists.txt.orig 2024-03-06 12:26:44.000000000 +0100 |
2 | +++ plasma-workspace-5.27.11/CMakeLists.txt 2024-04-19 19:10:24.300471629 +0200 | |
3 | @@ -183,12 +183,12 @@ if(FONTCONFIG_FOUND) | |
4 | find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS PrintSupport) | |
5 | endif() | |
6 | ||
7 | -find_package(AppStreamQt 0.10.6) | |
8 | -set_package_properties(AppStreamQt PROPERTIES DESCRIPTION "Access metadata for listing available software" | |
9 | +find_package(AppStreamQt5 1.0.0) | |
10 | +set_package_properties(AppStreamQt5 PROPERTIES DESCRIPTION "Access metadata for listing available software" | |
11 | URL "https://www.freedesktop.org/wiki/Distributions/AppStream/" | |
12 | TYPE OPTIONAL) | |
13 | ||
14 | -if(${AppStreamQt_FOUND}) | |
15 | +if(${AppStreamQt5_FOUND}) | |
16 | set(HAVE_APPSTREAMQT true) | |
17 | endif() | |
18 | ||
19 | --- plasma-workspace-5.27.11/runners/CMakeLists.txt.orig 2024-03-06 12:26:45.000000000 +0100 | |
20 | +++ plasma-workspace-5.27.11/runners/CMakeLists.txt 2024-04-19 19:48:24.908129658 +0200 | |
21 | @@ -14,7 +14,7 @@ add_subdirectory(shell) | |
22 | add_subdirectory(webshortcuts) | |
23 | add_subdirectory(windowedwidgets) | |
24 | ||
25 | -if(AppStreamQt_FOUND) | |
26 | +if(AppStreamQt5_FOUND) | |
27 | add_subdirectory(appstream) | |
28 | endif() | |
29 | ||
30 | --- plasma-workspace-5.27.11/applets/kicker/plugin/actionlist.cpp.orig 2024-03-06 12:26:45.000000000 +0100 | |
31 | +++ plasma-workspace-5.27.11/applets/kicker/plugin/actionlist.cpp 2024-04-19 19:30:46.728147966 +0200 | |
32 | @@ -32,7 +32,7 @@ | |
33 | #include "containmentinterface.h" | |
34 | ||
35 | #ifdef HAVE_APPSTREAMQT | |
36 | -#include <AppStreamQt/pool.h> | |
37 | +#include <AppStreamQt5/pool.h> | |
38 | #endif | |
39 | ||
40 | namespace KAStats = KActivities::Stats; | |
41 | @@ -448,10 +448,10 @@ bool handleAppstreamActions(const QStrin | |
42 | ||
43 | const auto components = | |
44 | appstreamPool->componentsByLaunchable(AppStream::Launchable::KindDesktopId, service->desktopEntryName() + QLatin1String(".desktop")); | |
45 | - if (components.empty()) { | |
46 | + if (components.isEmpty()) { | |
47 | return false; | |
48 | } | |
49 | - return QDesktopServices::openUrl(QUrl(QLatin1String("appstream://") + components[0].id())); | |
50 | + return QDesktopServices::openUrl(QUrl(QLatin1String("appstream://") + (*components.begin()).id())); | |
51 | #else | |
52 | return false; | |
53 | #endif | |
54 | --- plasma-workspace-5.27.11/runners/appstream/appstreamrunner.h.orig 2024-03-06 12:26:45.000000000 +0100 | |
55 | +++ plasma-workspace-5.27.11/runners/appstream/appstreamrunner.h 2024-04-19 20:14:39.284693907 +0200 | |
56 | @@ -6,7 +6,7 @@ | |
57 | ||
58 | #pragma once | |
59 | ||
60 | -#include <AppStreamQt/pool.h> | |
61 | +#include <AppStreamQt5/pool.h> | |
62 | #include <KRunner/AbstractRunner> | |
63 | #include <QMutex> | |
64 | ||
65 | @@ -22,7 +22,7 @@ public: | |
66 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override; | |
67 | ||
68 | private: | |
69 | - QList<AppStream::Component> findComponentsByString(const QString &query); | |
70 | + AppStream::ComponentBox findComponentsByString(const QString &query); | |
71 | ||
72 | AppStream::Pool m_db; | |
73 | QMutex m_appstreamMutex; | |
74 | --- plasma-workspace-5.27.11/runners/appstream/appstreamrunner.cpp.orig 2024-03-06 12:26:45.000000000 +0100 | |
75 | +++ plasma-workspace-5.27.11/runners/appstream/appstreamrunner.cpp 2024-04-19 20:24:28.295058106 +0200 | |
76 | @@ -6,7 +6,7 @@ | |
77 | ||
78 | #include "appstreamrunner.h" | |
79 | ||
80 | -#include <AppStreamQt/icon.h> | |
81 | +#include <AppStreamQt5/icon.h> | |
82 | ||
83 | #include <QDebug> | |
84 | #include <QDesktopServices> | |
85 | @@ -90,9 +90,12 @@ void InstallerRunner::match(Plasma::Runn | |
86 | } | |
87 | ||
88 | std::set<QString> uniqueIds; | |
89 | - const auto components = findComponentsByString(context.query()).mid(0, 3); | |
90 | + const auto components = findComponentsByString(context.query()); | |
91 | ||
92 | + int idx = 0; | |
93 | for (const AppStream::Component &component : components) { | |
94 | + if (++idx > 3) | |
95 | + break; | |
96 | if (component.kind() != AppStream::Component::KindDesktopApp) | |
97 | continue; | |
98 | ||
99 | @@ -145,13 +148,14 @@ void InstallerRunner::run(const Plasma:: | |
100 | qCWarning(RUNNER_APPSTREAM) << "couldn't open" << appstreamUrl; | |
101 | } | |
102 | ||
103 | -QList<AppStream::Component> InstallerRunner::findComponentsByString(const QString &query) | |
104 | +AppStream::ComponentBox InstallerRunner::findComponentsByString(const QString &query) | |
105 | { | |
106 | QMutexLocker locker(&m_appstreamMutex); | |
107 | QString error; | |
108 | static bool warnedOnce = false; | |
109 | - static bool opened = m_db.load(&error); | |
110 | + static bool opened = m_db.load(); | |
111 | if (!opened) { | |
112 | + error = m_db.lastError(); | |
113 | if (warnedOnce) { | |
114 | qCDebug(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error; | |
115 | } else { |