-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#390
- Loading branch information
1 parent
402d493
commit 1dc5181
Showing
7 changed files
with
144 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*! | ||
@chinese | ||
@ingroup dutil | ||
@file include/util/dutil.h | ||
|
||
该文件定义和实现了一些小的工具函数. | ||
|
||
@fn QString escapeToObjectPath(const QString &str) | ||
@brief 将字符串转义成符合DBus ObjectPath规则字符串 | ||
@param[in] str 需要转义的字符串 | ||
@return 转义后字符串 | ||
@attention 不要传入完整的dbus路径, 否则'/'也会被转义 | ||
|
||
@fn QString unescapeFromObjectPath(const QString &str) | ||
@brief 将DBus ObjectPath的部分路径转义成原来的字符串 | ||
@param[in] str 需要转义的字符串 | ||
@return 转义后字符串 | ||
|
||
@fn QString getAppIdFromAbsolutePath(const QString &path) | ||
@brief 从desktop文件的绝对路径中提取出AppId | ||
@param[in] path 文件路径 | ||
@return 代表AppId的字符串 | ||
@attention AppId可能为空, 代表无法获取AppId | ||
|
||
@fn QStringList getAbsolutePathFromAppId(const QString &appId) | ||
@brief 从appId中获取符合条件的Desktop文件路径 | ||
@param[in] appId app的Id | ||
@return desktop文件的路径 | ||
@attention 可能有多个desktop文件的appId相同, 所以返回所有符合条件的列表 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters