forked from qt-creator/qt-creator
Android: Use QRegularExpression in AndroidCreateKeystoreCertificate
Task-number: QTCREATORBUG-24098 Change-Id: I58e26a882d8ac5015c02b9dc9b7ff4934091b18a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QRegularExpression>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@@ -128,7 +129,7 @@ bool AndroidCreateKeystoreCertificate::checkCertificateAlias()
|
|||||||
|
|
||||||
bool AndroidCreateKeystoreCertificate::checkCountryCode()
|
bool AndroidCreateKeystoreCertificate::checkCountryCode()
|
||||||
{
|
{
|
||||||
if (!ui->countryLineEdit->text().contains(QRegExp(QLatin1String("[A-Z]{2}")))) {
|
if (!ui->countryLineEdit->text().contains(QRegularExpression("[A-Z]{2}"))) {
|
||||||
ui->infoLabel->setText(tr("<span style=\" color:#ff0000;\">Invalid country code</span>"));
|
ui->infoLabel->setText(tr("<span style=\" color:#ff0000;\">Invalid country code</span>"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user