Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
</property>

<property name="X_CreatedBy" type="s" access="read"/>
<property name="DesktopSourcePath" type="s" access="read"/>

<method name="SendToDesktop">
<arg type="b" name="success" direction="out"/>
Expand Down
6 changes: 6 additions & 0 deletions src/dbus/applicationservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@ QString ApplicationService::X_CreatedBy() const noexcept
return findEntryValue(DesktopFileEntryKey, "X-Created-By", EntryValueType::String).toString();
}

QString ApplicationService::desktopSourcePath() const noexcept
{
return m_desktopSource.sourcePath();
}

bool ApplicationService::terminal() const noexcept
{
auto val = findEntryValue(DesktopFileEntryKey, "Terminal", EntryValueType::String);
Expand Down Expand Up @@ -1096,6 +1101,7 @@ void ApplicationService::resetEntry(DesktopEntry *newEntry) noexcept
emit xDeepinCreatedByChanged();
emit execsChanged();
emit xCreatedByChanged();
emit desktopSourcePathChanged();
}

enum class SpliterState : uint8_t { Normal, InSingleQuote, InDoubleQuotes };
Expand Down
4 changes: 4 additions & 0 deletions src/dbus/applicationservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class ApplicationService : public QObject, protected QDBusContext
Q_PROPERTY(QString X_CreatedBy READ X_CreatedBy NOTIFY xCreatedByChanged)
[[nodiscard]] QString X_CreatedBy() const noexcept;

Q_PROPERTY(QString DesktopSourcePath READ desktopSourcePath NOTIFY desktopSourcePathChanged)
[[nodiscard]] QString desktopSourcePath() const noexcept;

[[nodiscard]] QDBusObjectPath findInstance(const QString &instanceId) const;

[[nodiscard]] const QString &getLauncher() const noexcept { return m_launcher; }
Expand Down Expand Up @@ -179,6 +182,7 @@ public Q_SLOTS:
void xDeepinCreatedByChanged();
void execsChanged();
void xCreatedByChanged();
void desktopSourcePathChanged();

private:
friend class ApplicationManager1Service;
Expand Down