MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / ProfileSetupDialog

Method ProfileSetupDialog

launcher/ui/dialogs/ProfileSetupDialog.cpp:52–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51
52ProfileSetupDialog::ProfileSetupDialog(MinecraftAccountPtr accountToSetup, QWidget *parent)
53 : QDialog(parent), m_accountToSetup(accountToSetup), ui(new Ui::ProfileSetupDialog)
54{
55 ui->setupUi(this);
56 ui->errorLabel->setVisible(false);
57
58 goodIcon = APPLICATION->getThemedIcon("status-good");
59 yellowIcon = APPLICATION->getThemedIcon("status-yellow");
60 badIcon = APPLICATION->getThemedIcon("status-bad");
61
62 QRegularExpression permittedNames("[a-zA-Z0-9_]{3,16}");
63 auto nameEdit = ui->nameEdit;
64 nameEdit->setValidator(new QRegularExpressionValidator(permittedNames));
65 nameEdit->setClearButtonEnabled(true);
66 validityAction = nameEdit->addAction(yellowIcon, QLineEdit::LeadingPosition);
67 connect(nameEdit, &QLineEdit::textEdited, this, &ProfileSetupDialog::nameEdited);
68
69 checkStartTimer.setSingleShot(true);
70 connect(&checkStartTimer, &QTimer::timeout, this, &ProfileSetupDialog::startCheck);
71
72 setNameStatus(NameStatus::NotSet, QString());
73}
74
75ProfileSetupDialog::~ProfileSetupDialog()
76{

Callers

nothing calls this directly

Calls 5

QStringClass · 0.85
setVisibleMethod · 0.80
getThemedIconMethod · 0.80
addActionMethod · 0.80
setupUiMethod · 0.45

Tested by

no test coverage detected