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 SDK
Commits
e819a2b8
Commit
e819a2b8
authored
Nov 21, 2020
by
Nicolas Fella
Browse files
Port away from Plasma::PluginLoader::listEngineInfo
parent
423704af
Changes
1
Hide whitespace changes
Inline
Side-by-side
engineexplorer/main.cpp
View file @
e819a2b8
...
...
@@ -9,6 +9,7 @@
#include
<QApplication>
#include
<KAboutData>
#include
<KLocalizedString>
#include
<KPluginMetaData>
#include
<Plasma/PluginLoader>
#include
<qcommandlineparser.h>
...
...
@@ -20,14 +21,16 @@ void listEngines()
{
int
maxLen
=
0
;
QMap
<
QString
,
QString
>
engines
;
foreach
(
const
KPluginInfo
&
info
,
Plasma
::
PluginLoader
::
listEngineInfo
())
{
int
len
=
info
.
pluginName
().
length
();
const
auto
plugins
=
Plasma
::
PluginLoader
::
self
()
->
listDataEngineMetaData
();
foreach
(
const
KPluginMetaData
&
info
,
plugins
)
{
int
len
=
info
.
pluginId
().
length
();
if
(
len
>
maxLen
)
{
maxLen
=
len
;
}
QString
name
=
info
.
plugin
Name
();
QString
comment
=
info
.
comment
();
QString
name
=
info
.
plugin
Id
();
QString
comment
=
info
.
description
();
if
(
comment
.
isEmpty
())
{
comment
=
i18n
(
"No description available"
);
...
...
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