Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
修复一些错别字和注释
去掉一些调试打印

Log:
  • Loading branch information
myml committed Feb 23, 2024
1 parent d0d1676 commit 4090f8e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
16 changes: 10 additions & 6 deletions calendar-client/src/dataManage/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};

Expand Down
8 changes: 4 additions & 4 deletions calendar-client/src/dataManage/accountmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
18 changes: 8 additions & 10 deletions calendar-client/src/dbus/dbusaccountmanagerrequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ void DbusAccountManagerRequest::setTimeFormatType(int value)
}

/**
* @brief setFirstDayofWeek
* 设置一周首日
* @brief setFirstDayofWeekSource
* 设置一周首日来源
*/
void DbusAccountManagerRequest::setFirstDayofWeekSource(DCalendarGeneralSettings::GeneralSettingSource value)
{
Expand All @@ -45,8 +45,8 @@ void DbusAccountManagerRequest::setFirstDayofWeekSource(DCalendarGeneralSettings
}

/**
* @brief DbusAccountManagerRequest::setTimeFormatType
* 设置时间显示格式
* @brief setTimeFormatTypeSource
* 设置时间显示格式来源
*/
void DbusAccountManagerRequest::setTimeFormatTypeSource(DCalendarGeneralSettings::GeneralSettingSource value)
{
Expand All @@ -55,8 +55,8 @@ void DbusAccountManagerRequest::setTimeFormatTypeSource(DCalendarGeneralSettings
}

/**
* @brief setFirstDayofWeek
* 设置一周首日
* @brief getFirstDayofWeekSource
* 获取一周首日来源
*/
DCalendarGeneralSettings::GeneralSettingSource DbusAccountManagerRequest::getFirstDayofWeekSource()
{
Expand All @@ -75,8 +75,8 @@ DCalendarGeneralSettings::GeneralSettingSource DbusAccountManagerRequest::getFir
}

/**
* @brief DbusAccountManagerRequest::setTimeFormatType
* 设置时间显示格式
* @brief getTimeFormatTypeSource
* 获取时间显示格式来源
*/
DCalendarGeneralSettings::GeneralSettingSource DbusAccountManagerRequest::getTimeFormatTypeSource()
{
Expand Down Expand Up @@ -177,7 +177,6 @@ bool DbusAccountManagerRequest::getIsSupportUid()
*/
void DbusAccountManagerRequest::slotCallFinished(CDBusPendingCallWatcher *call)
{
qDebug() << "slotCallFinished" << call->getmember();
int ret = 0;
bool canCall = true;
//错误处理
Expand Down Expand Up @@ -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") {
Expand Down
8 changes: 4 additions & 4 deletions calendar-client/src/dbus/dbusaccountmanagerrequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

//获取帐户列表
Expand Down
2 changes: 1 addition & 1 deletion calendar-common/src/dcalendargeneralsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DCalendarGeneralSettings
enum GeneralSettingSource {
Source_Database, // 来自系统设置(即控制中心)
Source_System, // 来自数据库(旧版本日历配置存放在数据库)
Source_Unknown, // 用于确定边界
Source_Unknown, // 用于确定枚举边界
};

typedef QSharedPointer<DCalendarGeneralSettings> Ptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<DCalendarGeneralSettings::GeneralSettingSource>(source);
m_accountManager->setTimeFormatTypeSource(val);
Expand Down

0 comments on commit 4090f8e

Please sign in to comment.