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
Network
Konqueror
Commits
2863d164
Commit
2863d164
authored
Dec 13, 2021
by
Alexander Lohnau
💬
Browse files
Add TryExec property to kget plugin
This way we don't display the kget plugin, unless we have the app installed.
parent
0bfdd89a
Pipeline
#109880
passed with stage
in 4 minutes and 11 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
libkonq/src/konq_kpart_plugin.cpp
View file @
2863d164
...
...
@@ -14,6 +14,7 @@
#include
<KPluginFactory>
#include
<KPluginLoader>
#include
<KPluginMetaData>
#include
<KService>
#include
<KSharedConfig>
#include
<KXMLGUIFactory>
...
...
@@ -104,6 +105,15 @@ QList<Plugin::PluginInfo> Plugin::pluginInfos(const QString &componentName)
continue
;
}
const
QString
guessedService
=
info
.
m_absXMLFileName
.
replace
(
QLatin1String
(
".rc"
),
QLatin1String
(
".desktop"
));
if
(
!
guessedService
.
isEmpty
()
&&
QFileInfo
::
exists
(
guessedService
))
{
KDesktopFile
file
(
guessedService
);
const
QString
tryExec
=
file
.
desktopGroup
().
readEntry
(
"TryExec"
);
if
(
!
tryExec
.
isEmpty
()
&&
QStandardPaths
::
findExecutable
(
tryExec
).
isEmpty
())
{
continue
;
}
}
plugins
.
append
(
info
);
}
...
...
plugins/kget/kget_plugin.desktop
View file @
2863d164
[Desktop Entry]
Encoding=UTF-8
Icon=kget
TryExec=kget
X-KDE-Library=konqueror_kget_browser_integration
X-KDE-PluginInfo-Author=KGet Maintainers
X-KDE-PluginInfo-Email=kget@kde.org
...
...
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