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
Activity manager service
Commits
913860ac
Commit
913860ac
authored
Apr 23, 2022
by
Volker Krause
Browse files
Port to KApplicationTrader
KServiceTypeTrader is deprecated.
parent
74113677
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/service/plugins/gtk-eventspy/GtkEventSpy.cpp
View file @
913860ac
...
...
@@ -13,8 +13,8 @@
#include
<QUrl>
#include
<QXmlStreamReader>
#include
<KApplicationTrader>
#include
<KDirWatch>
#include
<KServiceTypeTrader>
#include
"DebugPluginGtkEventSpy.h"
...
...
@@ -103,9 +103,9 @@ void GtkEventSpyPlugin::fileUpdated(const QString &filename)
}
// Search for applications which are executable and case-insensitively match the search term
// See https://techbase.kde.org/Development/Tutorials/Services/Traders#The_KTrader_Query_Language
const
auto
query
=
QString
(
"exist Exec and Exec ~~ '%1'"
).
ar
g
(
exec
)
;
const
KService
::
List
services
=
KServiceTypeTrader
::
self
()
->
query
(
QStringLiteral
(
"Application"
),
query
);
const
KService
::
List
services
=
KApplicationTrader
::
query
([
exec
](
const
KService
::
Ptr
&
app
)
{
return
app
->
exec
().
comp
ar
e
(
exec
,
Qt
::
CaseInsensitive
)
==
0
;
}
);
if
(
!
services
.
isEmpty
())
{
// use the first item matching
...
...
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