1 Star 1 Fork 0

Renzis/QT_library_homework

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
chpwd.cpp 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
Renzis 提交于 2022-10-10 22:38 . add
#include "chpwd.h"
#include "ui_chpwd.h"
#include "QMessageBox"
#include "UserDao.h"
Chpwd::Chpwd(QWidget *parent) :
QDialog(parent),
ui(new Ui::Chpwd)
{
ui->setupUi(this);
}
Chpwd::~Chpwd()
{
delete ui;
}
void Chpwd::on_pushButton_clicked()
{
if(ui->newrepeat->text().length() < 1 || ui->new_2->text().length() < 1 || ui->raw->text().length() < 1){
QMessageBox::information(this, "提示", "输入不能为空!");
} else if(ui->newrepeat->text() != ui->new_2->text()) {
QMessageBox::information(this, "提示", "两次输入的密码不一致!");
ui->newrepeat->clear();
ui->new_2->clear();
} else {
if(doJudge(user->account, ui->raw->text())) {
qDebug() << "here";
if(changePwd(user->aid, ui->newrepeat->text().toStdString())) {
QMessageBox::information(this, "提示", "修改成功!");
}
} else {
QMessageBox::information(this, "提示", "原密码错误!");
ui->raw->clear();
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/renzis/S1.git
git@gitee.com:renzis/S1.git
renzis
S1
QT_library_homework
master

搜索帮助