fix: UserOperationLog record error while add account.
This commit is contained in:
@@ -216,19 +216,19 @@ bool AccountFormDialog::updateReferenceData()
|
||||
warn(tr("User Name can't be empty!"));
|
||||
return false;
|
||||
}
|
||||
QString oldUserName = User::Current()->getUserName();
|
||||
User::Current()->setUserName(mNewUserName);
|
||||
LOG_USER_OPERATION(QString("Change User Name from %1 to %2").arg(oldUserName).arg(mNewUserName))
|
||||
}
|
||||
if (this->mCommentChanged)
|
||||
{
|
||||
User::Current()->setComment(mNewComment);
|
||||
}
|
||||
QString oldUserName = User::Current()->getUserName();
|
||||
bool ret = User::Current()->submitChange();
|
||||
if (ret)
|
||||
{
|
||||
hideWarn();
|
||||
EventCenter::Default()->triggerEvent(CurrentUserInfoChanged, nullptr, nullptr);
|
||||
LOG_USER_OPERATION(QString("Change User Name from %1 to %2").arg(oldUserName).arg(mNewUserName))
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -335,7 +335,7 @@ bool AccountFormDialog::updateReferenceData()
|
||||
if (mRefModel->submit())
|
||||
{
|
||||
hideWarn();
|
||||
LOG_USER_OPERATION("Add Account, ID:" + mLeUserName->text());
|
||||
LOG_USER_OPERATION("Add Account, ID:" + mLeUserCode->text());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user