Parameters for sql execute

This commit is contained in:
Krad
2021-11-12 14:32:22 +08:00
parent 131fbb2e24
commit 1ffe4224ac
9 changed files with 191 additions and 28 deletions

View File

@@ -15,10 +15,18 @@ USER_PROPERTY(Comment)
#include <QObject>
#include <QtCore/QCryptographicHash>
class User:public QObject {
Q_OBJECT
public:
static bool QueryUser(QString userID, QString Pwd);
static QString getEncryptedPassword(const QString& password)
{
QByteArray bytePwd = password.toLatin1();
QByteArray bytePwdMd5 = QCryptographicHash::hash(bytePwd, QCryptographicHash::Md5);
return bytePwdMd5.toHex();
}
static User* Current(){
return currentUser;
}
@@ -46,7 +54,10 @@ public:
USER_PROPERTIES_MACRO()
#undef USER_PROPERTY
#undef USER_READONLY_PROPERTY
void restorePassword(const QString& original_pwd){
m_Password = original_pwd;
mf_Password = false;
}
bool submitChange();
private:
static User* currentUser;