feat: About 窗口版本号改为项目统一版本,仓库地址增加一键复制按钮

This commit is contained in:
2026-07-19 19:13:13 +08:00
parent 6b2721c821
commit fcb43fe34f
4 changed files with 110 additions and 2 deletions
+9
View File
@@ -116,6 +116,15 @@ QString NetworkMonitorApplet::ipv6Address() const
return m_ipv6Address;
}
// 返回插件版本号,从 dde-shell 插件元数据(metadata.json)读取
// 版本唯一源为 CMakeLists.txt 的 project(VERSION),经 configure_file 写入 metadata.json
// dde-shell 加载时存入 DPluginMetaData,此处通过继承自 DApplet 的 pluginMetaData() 读取
QString NetworkMonitorApplet::version() const
{
// metadata.json 结构:{ "Plugin": { "Version": "x.y.z", ... } }
return pluginMetaData().value("Plugin").toMap().value("Version").toString();
}
void NetworkMonitorApplet::refresh()
{
readNetworkStats();