Code clean, and code style error fix.

This commit is contained in:
Krad
2022-04-22 17:16:45 +08:00
parent 7cee364fc3
commit 27487fdf3c
21 changed files with 198 additions and 240 deletions

View File

@@ -20,8 +20,8 @@ USER_PROPERTY(Comment)
class User:public QObject {
Q_OBJECT
public:
static bool QueryUser(QString userID, QString Pwd);
static bool existsUser(QString userCode);
static bool QueryUser(const QString& userID, const QString& Pwd);
static bool existsUser(const QString& userCode);
static QString getEncryptedPassword(const QString& password)
{
QByteArray bytePwd = password.toLatin1();
@@ -31,8 +31,8 @@ public:
static User* Current(){
return currentUser;
}
static bool getUser(QString userUID,User& user);
static bool insertUser(QString UserCode,User& user);
static bool getUser(const QString& userUID,User& user);
static bool insertUser(const QString& UserCode,User& user);
explicit User(QObject *parent=nullptr);
~User();
QString getIndexName(){
@@ -65,8 +65,8 @@ public:
bool isAdmin();
bool isEngineer();
bool resetPassword();
static QString getRoleName(QString RoleID);
static QString getRoleID(QString RoleName);
static QString getRoleName(const QString& RoleID);
static QString getRoleID(const QString& RoleName);
static QStringList getAllRoleName();
private:
static User* currentUser;