Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
2a81512f
Commit
2a81512f
authored
Nov 21, 2020
by
Nicolas Fella
Browse files
[weatherengine] Port from KPluginInfo to KPluginMetaData
parent
aec20ebe
Changes
1
Hide whitespace changes
Inline
Side-by-side
dataengines/weather/weatherengine.cpp
View file @
2a81512f
...
...
@@ -22,6 +22,7 @@
#include
<KSycoca>
#include
<KPluginMetaData>
#include
<Plasma/DataContainer>
#include
<Plasma/PluginLoader>
...
...
@@ -59,10 +60,10 @@ void WeatherEngine::updateIonList(const QStringList &changedResources)
{
if
(
changedResources
.
isEmpty
()
||
changedResources
.
contains
(
QLatin1String
(
"services"
)))
{
removeAllData
(
QStringLiteral
(
"ions"
));
const
auto
infos
=
Plasma
::
PluginLoader
::
self
()
->
listEngine
Info
(
QStringLiteral
(
"weatherengine"
));
for
(
const
KPlugin
Info
&
info
:
infos
)
{
const
QString
data
=
info
.
name
()
+
QLatin1Char
(
'|'
)
+
info
.
plugin
Name
();
setData
(
QStringLiteral
(
"ions"
),
info
.
plugin
Name
(),
data
);
const
auto
infos
=
Plasma
::
PluginLoader
::
self
()
->
list
Data
Engine
MetaData
(
QStringLiteral
(
"weatherengine"
));
for
(
const
KPlugin
MetaData
&
info
:
infos
)
{
const
QString
data
=
info
.
name
()
+
QLatin1Char
(
'|'
)
+
info
.
plugin
Id
();
setData
(
QStringLiteral
(
"ions"
),
info
.
plugin
Id
(),
data
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment