Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
Plasma SDK
Commits
e819a2b8
Commit
e819a2b8
authored
Nov 21, 2020
by
Nicolas Fella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port away from Plasma::PluginLoader::listEngineInfo
parent
423704af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
engineexplorer/main.cpp
engineexplorer/main.cpp
+7
-4
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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