Skip to content

Commit

Permalink
fix: deepin-system-monitor crashed
Browse files Browse the repository at this point in the history
  It intrudced in the commit 6e1c14c
Missing DBus's assignment of the ObjectPath.
  • Loading branch information
18202781743 committed Sep 12, 2023
1 parent 6e1c14c commit 44f5f1b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ class V23SystemState : public SystemState
AccountsInterface = "org.deepin.dde.Accounts1";
UserInterface = "org.deepin.dde.Accounts1.User";

TrayManagerService = "org.deepin.dde.TrayManager1";
TrayManagerPath = "/org/deepin/dde/TrayManager1";
TrayManagerInterface = "org.freedesktop.DBus.Properties";

DockService = "org.deepin.dde.Dock1";
DockPath = "/org/deepin/dde/Dock1";
DockInterface = "org.freedesktop.DBus.Properties";
Expand Down Expand Up @@ -114,6 +118,10 @@ class V20SystemState : public SystemState
AccountsInterface = "com.deepin.daemon.Accounts";
UserInterface = "com.deepin.daemon.Accounts.User";

TrayManagerService = "com.deepin.dde.TrayManager";
TrayManagerPath = "/com/deepin/dde/TrayManager";
TrayManagerInterface = "org.freedesktop.DBus.Properties";

DockService = "com.deepin.dde.Dock";
DockPath = "/com/deepin/dde/Dock";
DockInterface = "org.freedesktop.DBus.Properties";
Expand Down Expand Up @@ -141,7 +149,7 @@ static inline const SystemState &systemInfo()
if (!state) {
const auto version = DTK_CORE_NAMESPACE::DSysInfo::majorVersion();
qInfo() << "Running desktop environment version is:" << version << ", versionNumber:" << version.toLong();
if (version.toLong() <= 20) {
if (!version.isEmpty() && version.toLong() <= 20) {
state = new V20SystemState();
state->updateVersion(true);
} else {
Expand Down

0 comments on commit 44f5f1b

Please sign in to comment.