From 11d0d3e9bb50d786df7d413de10a2b9543ea5206 Mon Sep 17 00:00:00 2001 From: zhaominyong Date: Mon, 27 Dec 2021 09:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kybackup/module/databackup.cpp | 3 ++- kybackup/module/systembackup.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kybackup/module/databackup.cpp b/kybackup/module/databackup.cpp index a8db972..34f33e6 100644 --- a/kybackup/module/databackup.cpp +++ b/kybackup/module/databackup.cpp @@ -1031,7 +1031,8 @@ void DataBackup::initForthWidget() editBackupName->setText(m_backupName); } // 支持输入中英文数字和部分字符 - QRegExp regx("^[\u4e00-\u9fa5a-zA-Z0-9~!@#$%^&*()-_+={}':;'\\[\\].<>/? ¥()——;《》‘’:“”、?]+$"); //其中匹配中文[\u4e00-\u9fa5] + // QRegExp regx("^[\u4e00-\u9fa5a-zA-Z0-9~!@#$%^&*()-_+={}':;'\\[\\].<>/? ¥()——;《》‘’:“”、?]+$"); //其中匹配中文[\u4e00-\u9fa5] + QRegExp regx("^[\u4e00-\u9fa5a-zA-Z0-9-@& +():'()——《》‘’:“”]*$"); QValidator *validator = new QRegExpValidator(regx); editBackupName->setValidator(validator); // 备份名称错误提示 diff --git a/kybackup/module/systembackup.cpp b/kybackup/module/systembackup.cpp index 88bf87b..b264c85 100755 --- a/kybackup/module/systembackup.cpp +++ b/kybackup/module/systembackup.cpp @@ -616,7 +616,8 @@ void SystemBackup::initForthWidget() editBackupName->setMaxLength(100); editBackupName->setPlaceholderText(QDateTime::currentDateTime().toString("yy-MM-dd hh:mm:ss")); // 支持输入中英文数字和部分字符 - QRegExp regx("^[\u4e00-\u9fa5a-zA-Z0-9~!@#$%^&*()-_+={}':;'\\[\\].<>/? ¥()——;《》‘’:“”、?]+$"); //其中匹配中文[\u4e00-\u9fa5] + // QRegExp regx("^[\u4e00-\u9fa5a-zA-Z0-9~!@#$%^&*()-_+={}':;'\\[\\].<>/? ¥()——;《》‘’:“”、?]+$"); //其中匹配中文[\u4e00-\u9fa5] + QRegExp regx("^[\u4e00-\u9fa5a-zA-Z0-9-@& +():'()——《》‘’:“”]*$"); QValidator *validator = new QRegExpValidator(regx); editBackupName->setValidator(validator); // 备份名称错误提示