Refactor css, clear path in code.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <QToolButton>
|
||||
#include <QtWidgets/QLabel>
|
||||
|
||||
#include "guimacros.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "models/User.h"
|
||||
#include "log/UserOperationLog.h"
|
||||
@@ -100,12 +99,13 @@ void LoginDialog::initializeEdit()
|
||||
|
||||
void LoginDialog::initializeLoginButton()
|
||||
{
|
||||
ADD_TOOL_BTN_TO_LAYOUT(login, ":/icons/login.png", mDialogContentsLayout)
|
||||
btnlogin->setText(tr("Login"));
|
||||
mDialogContentsLayout->removeWidget(btnlogin);
|
||||
mDialogContentsLayout->addWidget(btnlogin, 0, Qt::AlignCenter);
|
||||
mLoginButton = btnlogin;
|
||||
btnlogin->setObjectName("btnlogin");
|
||||
auto btnLogin = new QToolButton(this);
|
||||
btnLogin->setObjectName("btnlogin");
|
||||
mDialogContentsLayout->addWidget(btnLogin);
|
||||
btnLogin->setText(tr("Login"));
|
||||
mDialogContentsLayout->removeWidget(btnLogin);
|
||||
mDialogContentsLayout->addWidget(btnLogin, 0, Qt::AlignCenter);
|
||||
mLoginButton = btnLogin;
|
||||
connect(mLoginButton, SIGNAL(clicked()), this, SLOT(doLogin()));
|
||||
}
|
||||
|
||||
@@ -135,9 +135,11 @@ void LoginDialog::doLogin()
|
||||
QString encryptPwd = User::getEncryptedPassword(strPassWord);
|
||||
if (User::QueryUser(strUserCode, encryptPwd))
|
||||
{
|
||||
mErrorMessage->setVisible(false);
|
||||
accept();
|
||||
LOG_USER_OPERATION(Login);
|
||||
JsonObject::Instance()->setDefaultUser(strUserCode);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user