Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/qtxdg/xdgdesktopfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,11 @@ QString XdgDesktopFile::actionName(const QString & action) const
: QString{};
}

QStringList XdgDesktopFile::actionExpandExecString(const QString & action, const QStringList& urls) const
{
return XdgDesktopAction{*this, action}.expandExecString(urls);
}

XdgDesktopFile::Type XdgDesktopFile::type() const
{
return d->mType;
Expand Down
9 changes: 8 additions & 1 deletion src/qtxdg/xdgdesktopfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,14 @@ class QTXDG_API XdgDesktopFile
@par urls - A list of files or URLS. Each file is passed as a separate argument to the result string program.*/
QStringList expandExecString(const QStringList& urls = QStringList()) const;

/*! Returns the URL for the Link desktop file; otherwise an empty string is returned. */
/*! A Exec value consists of an executable program optionally followed by one or more arguments.
This function expands this arguments for @par action and returns command line string parts.
Note this method make sense only for Application type.
@par action - The action on which to query the expanded exec string.
@par urls - A list of files or URLS. Each file is passed as a separate argument to the result string program.*/
QStringList actionExpandExecString(const QString & action, const QStringList& urls = QStringList()) const;

/*! Returns the URL for the Link desktop file; otherwise an empty string is returned. */
QString url() const;

/*! Computes the desktop file ID. It is the identifier of an installed
Expand Down