feat: add property 'X_Deepin_Vender'

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe 2023-11-06 15:58:46 +08:00 committed by Comix
parent e61c8ae17a
commit d35ef8ae1f
3 changed files with 13 additions and 0 deletions

View File

@ -9,6 +9,11 @@
<property name="Categories" type="as" access="read"/>
<property name="X_linglong" type="b" access="read"/>
<property name="X_Flatpak" type="b" access="read"/>
<property name="X_Vendor_Deepin" type="s" access="read">
<annotation name="org.freedesktop.DBus.Description" value="Whem this property is 'deepin', display name of the application
should use GenericName."
/>
</property>
<property name="installedTime" type="t" access="read"/>
<property name="NoDisplay" type="b" access="read"/>
<property name="MimeTypes" type="as" access="readwrite"/>

View File

@ -476,6 +476,11 @@ bool ApplicationService::x_linglong() const noexcept
return !val.isNull();
}
QString ApplicationService::x_Vendor_Deepin() const noexcept
{
return findEntryValue(DesktopFileEntryKey, "X-Deepin-Vendor", EntryValueType::String).toString();
}
bool ApplicationService::terminal() const noexcept
{
auto val = findEntryValue(DesktopFileEntryKey, "Terminal", EntryValueType::String);

View File

@ -89,6 +89,9 @@ public:
Q_PROPERTY(bool X_linglong READ x_linglong NOTIFY x_linglongChanged)
[[nodiscard]] bool x_linglong() const noexcept;
Q_PROPERTY(QString X_Vendor_Deepin READ x_Vendor_Deepin)
[[nodiscard]] QString x_Vendor_Deepin() const noexcept;
Q_PROPERTY(qulonglong installedTime READ installedTime NOTIFY installedTimeChanged)
[[nodiscard]] qulonglong installedTime() const noexcept;