Debian Codegraph @

docs/util/dutil.zh_CN.dox

raw
1 /*!
2 @chinese
3 @ingroup dutil
4 @file include/util/dutil.h
5
6 该文件定义和实现了一些小的工具函数.
7
8 @fn QString DUtil::escapeToObjectPath(const QString &str)
9 @brief 将字符串转义成符合DBus ObjectPath规则字符串
10 @param[in] str 需要转义的字符串
11 @return 转义后字符串
12 @attention 不要传入完整的dbus路径, 否则'/'也会被转义
13
14 @fn QString DUtil::unescapeFromObjectPath(const QString &str)
15 @brief 将DBus ObjectPath的部分路径转义成原来的字符串
16 @param[in] str 需要转义的字符串
17 @return 转义后字符串
18
19 @fn QString DUtil::getAppIdFromAbsolutePath(const QString &path)
20 @brief 从desktop文件的绝对路径中提取出AppId
21 @param[in] path 文件路径
22 @return 代表AppId的字符串
23 @attention AppId可能为空, 代表无法获取AppId
24
25 @fn QStringList DUtil::getAbsolutePathFromAppId(const QString &appId)
26 @brief 从appId中获取符合条件的Desktop文件路径
27 @param[in] appId app的Id
28 @return desktop文件的路径
29 @attention 可能有多个desktop文件的appId相同, 所以返回所有符合条件的列表
30
31 */