Use QRegularExpression instead QRegExp.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-05-14 16:04:23 +03:00
parent 0485489b22
commit d200548661
2 changed files with 3 additions and 2 deletions

View File

@ -127,7 +127,8 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
}
else
{
QRegExpValidator *reg = new QRegExpValidator(QRegExp("\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"));
QRegularExpressionValidator *reg =
new QRegularExpressionValidator(QRegularExpression("\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"));
ui->lineEditMail->setValidator(reg);
HideColumns(ui->tableWidgetMeasurements);

View File

@ -49,7 +49,7 @@ DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int c
SCASSERT(bOk != nullptr);
bOk->setEnabled(false);
QRegExpValidator *validator = new QRegExpValidator(QRegExp("^[\\w\\-. ]+$"), this);
QRegularExpressionValidator *validator = new QRegularExpressionValidator(QRegularExpression("^[\\w\\-. ]+$"), this);
ui->lineEditFileName->setValidator(validator);
ui->lineEditFileName->setText(fileName+"_");