chore: make all the regexes static const
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
21c90527d2
commit
c5fd5e6ac1
37 changed files with 87 additions and 84 deletions
|
@ -59,9 +59,9 @@ ProfileSetupDialog::ProfileSetupDialog(MinecraftAccountPtr accountToSetup, QWidg
|
|||
yellowIcon = APPLICATION->getThemedIcon("status-yellow");
|
||||
badIcon = APPLICATION->getThemedIcon("status-bad");
|
||||
|
||||
QRegularExpression permittedNames("[a-zA-Z0-9_]{3,16}");
|
||||
static const QRegularExpression s_permittedNames("[a-zA-Z0-9_]{3,16}");
|
||||
auto nameEdit = ui->nameEdit;
|
||||
nameEdit->setValidator(new QRegularExpressionValidator(permittedNames));
|
||||
nameEdit->setValidator(new QRegularExpressionValidator(s_permittedNames));
|
||||
nameEdit->setClearButtonEnabled(true);
|
||||
validityAction = nameEdit->addAction(yellowIcon, QLineEdit::LeadingPosition);
|
||||
connect(nameEdit, &QLineEdit::textEdited, this, &ProfileSetupDialog::nameEdited);
|
||||
|
@ -268,7 +268,6 @@ void ProfileSetupDialog::setupProfileFinished()
|
|||
QString errorMessage =
|
||||
tr("Network Error: %1\nHTTP Status: %2").arg(m_profile_task->errorString(), QString::number(m_profile_task->replyStatusCode()));
|
||||
|
||||
|
||||
if (parsedError.fullyParsed) {
|
||||
errorMessage += "Path: " + parsedError.path + "\n";
|
||||
errorMessage += "Error: " + parsedError.error + "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue