From c1f43219928092fb61b837b3e1a7b1b786ea0043 Mon Sep 17 00:00:00 2001 From: myml Date: Fri, 23 Feb 2024 11:36:24 +0800 Subject: [PATCH] chore: typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复一些错别字和注释 去掉一些调试打印 Log: --- .../src/dataManage/accountmanager.cpp | 16 ++++++++++------ .../src/dataManage/accountmanager.h | 8 ++++---- .../src/dbus/dbusaccountmanagerrequest.cpp | 18 ++++++++---------- .../src/dbus/dbusaccountmanagerrequest.h | 8 ++++---- calendar-common/src/dcalendargeneralsettings.h | 2 +- .../src/dbusservice/daccountmanagerservice.cpp | 1 - 6 files changed, 27 insertions(+), 26 deletions(-) diff --git a/calendar-client/src/dataManage/accountmanager.cpp b/calendar-client/src/dataManage/accountmanager.cpp index 32a7a8ed..e6b99f27 100644 --- a/calendar-client/src/dataManage/accountmanager.cpp +++ b/calendar-client/src/dataManage/accountmanager.cpp @@ -173,22 +173,26 @@ void AccountManager::setTimeFormatType(int value) } // 设置一周首日来源 -void AccountManager::setFirstDayofWeekSource(DCalendarGeneralSettings::GeneralSettingSource value){ +void AccountManager::setFirstDayofWeekSource(DCalendarGeneralSettings::GeneralSettingSource value) +{ m_dbusRequest->setFirstDayofWeekSource(value); }; // 设置时间显示格式来源 -void AccountManager::setTimeFormatTypeSource(DCalendarGeneralSettings::GeneralSettingSource value){ +void AccountManager::setTimeFormatTypeSource(DCalendarGeneralSettings::GeneralSettingSource value) +{ m_dbusRequest->setTimeFormatTypeSource(value); }; -// 设置一周首日来源 -DCalendarGeneralSettings::GeneralSettingSource AccountManager::getFirstDayofWeekSource(){ +// 获取一周首日来源 +DCalendarGeneralSettings::GeneralSettingSource AccountManager::getFirstDayofWeekSource() +{ return m_dbusRequest->getFirstDayofWeekSource(); }; -// 设置时间显示格式来源 -DCalendarGeneralSettings::GeneralSettingSource AccountManager::getTimeFormatTypeSource(){ +// 获取时间显示格式来源 +DCalendarGeneralSettings::GeneralSettingSource AccountManager::getTimeFormatTypeSource() +{ return m_dbusRequest->getTimeFormatTypeSource(); }; diff --git a/calendar-client/src/dataManage/accountmanager.h b/calendar-client/src/dataManage/accountmanager.h index 0f1e44b3..1ad33085 100644 --- a/calendar-client/src/dataManage/accountmanager.h +++ b/calendar-client/src/dataManage/accountmanager.h @@ -38,13 +38,13 @@ class AccountManager : public QObject void setFirstDayofWeek(int); //设置时间显示格式 void setTimeFormatType(int); - //设置一周首日来源 + // 设置一周首日来源 void setFirstDayofWeekSource(DCalendarGeneralSettings::GeneralSettingSource); - //设置时间显示格式来源 + // 设置时间显示格式来源 void setTimeFormatTypeSource(DCalendarGeneralSettings::GeneralSettingSource); - //获取一周首日来源 + // 获取一周首日来源 DCalendarGeneralSettings::GeneralSettingSource getFirstDayofWeekSource(); - //获取时间显示格式来源 + // 获取时间显示格式来源 DCalendarGeneralSettings::GeneralSettingSource getTimeFormatTypeSource(); //帐户登录 void login(); diff --git a/calendar-client/src/dbus/dbusaccountmanagerrequest.cpp b/calendar-client/src/dbus/dbusaccountmanagerrequest.cpp index 8ac92da8..9f713e40 100644 --- a/calendar-client/src/dbus/dbusaccountmanagerrequest.cpp +++ b/calendar-client/src/dbus/dbusaccountmanagerrequest.cpp @@ -35,8 +35,8 @@ void DbusAccountManagerRequest::setTimeFormatType(int value) } /** - * @brief setFirstDayofWeek - * 设置一周首日 + * @brief setFirstDayofWeekSource + * 设置一周首日来源 */ void DbusAccountManagerRequest::setFirstDayofWeekSource(DCalendarGeneralSettings::GeneralSettingSource value) { @@ -45,8 +45,8 @@ void DbusAccountManagerRequest::setFirstDayofWeekSource(DCalendarGeneralSettings } /** - * @brief DbusAccountManagerRequest::setTimeFormatType - * 设置时间显示格式 + * @brief setTimeFormatTypeSource + * 设置时间显示格式来源 */ void DbusAccountManagerRequest::setTimeFormatTypeSource(DCalendarGeneralSettings::GeneralSettingSource value) { @@ -55,8 +55,8 @@ void DbusAccountManagerRequest::setTimeFormatTypeSource(DCalendarGeneralSettings } /** - * @brief setFirstDayofWeek - * 设置一周首日 + * @brief getFirstDayofWeekSource + * 获取一周首日来源 */ DCalendarGeneralSettings::GeneralSettingSource DbusAccountManagerRequest::getFirstDayofWeekSource() { @@ -75,8 +75,8 @@ DCalendarGeneralSettings::GeneralSettingSource DbusAccountManagerRequest::getFir } /** - * @brief DbusAccountManagerRequest::setTimeFormatType - * 设置时间显示格式 + * @brief getTimeFormatTypeSource + * 获取时间显示格式来源 */ DCalendarGeneralSettings::GeneralSettingSource DbusAccountManagerRequest::getTimeFormatTypeSource() { @@ -177,7 +177,6 @@ bool DbusAccountManagerRequest::getIsSupportUid() */ void DbusAccountManagerRequest::slotCallFinished(CDBusPendingCallWatcher *call) { - qDebug() << "slotCallFinished" << call->getmember(); int ret = 0; bool canCall = true; //错误处理 @@ -225,7 +224,6 @@ void DbusAccountManagerRequest::slotCallFinished(CDBusPendingCallWatcher *call) void DbusAccountManagerRequest::slotDbusCall(const QDBusMessage &msg) { - qDebug() << "DbusAccountManagerRequest::slotDbusCall" << msg.member(); if (msg.member() == "accountUpdate") { getAccountList(); }else if (msg.member() == "PropertiesChanged") { diff --git a/calendar-client/src/dbus/dbusaccountmanagerrequest.h b/calendar-client/src/dbus/dbusaccountmanagerrequest.h index cea019bc..e38af8a7 100644 --- a/calendar-client/src/dbus/dbusaccountmanagerrequest.h +++ b/calendar-client/src/dbus/dbusaccountmanagerrequest.h @@ -20,13 +20,13 @@ class DbusAccountManagerRequest : public DbusRequestBase void setFirstDayofWeek(int); //设置时间显示格式 void setTimeFormatType(int); - //设置一周首日来源 + // 设置一周首日来源 void setFirstDayofWeekSource(DCalendarGeneralSettings::GeneralSettingSource); - //设置时间显示格式来源 + // 设置时间显示格式来源 void setTimeFormatTypeSource(DCalendarGeneralSettings::GeneralSettingSource); - //设置一周首日来源 + // 获取一周首日来源 DCalendarGeneralSettings::GeneralSettingSource getFirstDayofWeekSource(); - //设置时间显示格式来源 + // 获取时间显示格式来源 DCalendarGeneralSettings::GeneralSettingSource getTimeFormatTypeSource(); //获取帐户列表 diff --git a/calendar-common/src/dcalendargeneralsettings.h b/calendar-common/src/dcalendargeneralsettings.h index 473adc89..4656a6c0 100644 --- a/calendar-common/src/dcalendargeneralsettings.h +++ b/calendar-common/src/dcalendargeneralsettings.h @@ -24,7 +24,7 @@ class DCalendarGeneralSettings enum GeneralSettingSource { Source_Database, // 来自系统设置(即控制中心) Source_System, // 来自数据库(旧版本日历配置存放在数据库) - Source_Unknown, // 用于确定边界 + Source_Unknown, // 用于确定枚举边界 }; typedef QSharedPointer Ptr; diff --git a/calendar-service/src/dbusservice/daccountmanagerservice.cpp b/calendar-service/src/dbusservice/daccountmanagerservice.cpp index eab09583..3860ac94 100644 --- a/calendar-service/src/dbusservice/daccountmanagerservice.cpp +++ b/calendar-service/src/dbusservice/daccountmanagerservice.cpp @@ -170,7 +170,6 @@ int DAccountManagerService::getTimeFormatTypeSource() void DAccountManagerService::setTimeFormatTypeSource(const int source) { - qDebug() << "setTimeFormatTypeSource" << source; if (source >= 0 && source < DCalendarGeneralSettings::GeneralSettingSource::Source_Unknown) { auto val = static_cast(source); m_accountManager->setTimeFormatTypeSource(val);