Skip to content

Commit

Permalink
fix: in the Community Edition, right clicking to modify the account i…
Browse files Browse the repository at this point in the history
…nformation has no reaction

Determine the system version and pass different parameters to the DBUS
interface ShowPage according to the version.

Log: in the Community Edition, right clicking to modify the account information has no reaction
Bug: https://pms.uniontech.com/bug-view-252625.html
  • Loading branch information
tanghongyao committed Jul 1, 2024
1 parent e8f8114 commit dcb3c2f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions deepin-system-monitor-main/model/accounts_info_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ bool AccountsInfoModel::LogoutByUserName(const QString &userName)

void AccountsInfoModel::EditAccount()
{
if (m_controlInter)
m_controlInter->call("ShowPage", "accounts", "Accounts Detail");
if (m_controlInter) {
bool version = common::systemInfo().isOldVersion();
if (version) {

Check warning on line 235 in deepin-system-monitor-main/model/accounts_info_model.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Expression is always true because 'else if' condition is opposite to previous condition at line 235.
//专业版v20接口:ShowPage(String module, String page)
m_controlInter->call("ShowPage", "accounts", "Accounts Detail");
} else if (!version) {
//社区版V23接口:ShowPage(String url)
m_controlInter->call("ShowPage", "accounts");
}
}
}

0 comments on commit dcb3c2f

Please sign in to comment.