feat: add property 'NoDisplay'
Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
parent
2c1f35b820
commit
55e3aa2fae
@ -10,6 +10,7 @@
|
||||
<property name="X_linglong" type="b" access="read"/>
|
||||
<property name="X_Flatpak" type="b" access="read"/>
|
||||
<property name="installedTime" type="t" access="read"/>
|
||||
<property name="NoDisplay" type="b" access="read"/>
|
||||
|
||||
<property name="Actions" type="as" access="read">
|
||||
<annotation
|
||||
|
@ -276,6 +276,17 @@ bool ApplicationService::isOnDesktop() const noexcept
|
||||
return info.symLinkTarget() == m_desktopSource.sourcePath();
|
||||
}
|
||||
|
||||
bool ApplicationService::noDisplay() const noexcept
|
||||
{
|
||||
auto val = findEntryValue(DesktopFileEntryKey, "NoDisplay", EntryValueType::Boolean);
|
||||
|
||||
if (val.isNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return val.toBool();
|
||||
}
|
||||
|
||||
QStringList ApplicationService::actions() const noexcept
|
||||
{
|
||||
auto val = findEntryValue(DesktopFileEntryKey, "Actions", EntryValueType::String);
|
||||
|
@ -76,6 +76,9 @@ public:
|
||||
Q_PROPERTY(bool isOnDesktop READ isOnDesktop)
|
||||
[[nodiscard]] bool isOnDesktop() const noexcept;
|
||||
|
||||
Q_PROPERTY(bool NoDisplay READ noDisplay)
|
||||
[[nodiscard]] bool noDisplay() const noexcept;
|
||||
|
||||
[[nodiscard]] QDBusObjectPath findInstance(const QString &instanceId) const;
|
||||
|
||||
[[nodiscard]] const QString &getLauncher() const noexcept { return m_launcher; }
|
||||
|
Loading…
Reference in New Issue
Block a user