fix: Fix setValidator memory leak.

This commit is contained in:
sunwen
2024-06-21 15:14:54 +08:00
parent 5e768b7e9c
commit b61a2d178d
2 changed files with 7 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ AccountFormDialog::AccountFormDialog(QWidget* parent, AccountEditMode mode, Qt::
&AccountFormDialog::changeSelfPassword : &AccountFormDialog::resetUserPassword);
}
mLeUserName->setValidator(new QRegExpValidator(QRegExp("^[A-Za-z0-9\u4e00-\u9fa5]+$")));
mLeUserName->setValidator(new QRegExpValidator(QRegExp("^[A-Za-z0-9\u4e00-\u9fa5]+$"), mLeUserName));
connect(mLeComment, &QLineEdit::textChanged, [=](const QString& text) {
mCommentChanged = true;
});