MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / setCode

Method setCode

Telegram/SourceFiles/intro/intro_code_input.cpp:209–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void CodeInput::setCode(QString code) {
210 using namespace TextUtilities;
211 code = code.remove(RegExpDigitsExclude()).mid(0, _digitsCountMax);
212 for (int i = 0; i < _digits.size(); i++) {
213 if (i >= code.size()) {
214 return;
215 }
216 _digits[i]->setDigit(code.at(i).digitValue());
217 }
218}
219
220void CodeInput::requestCode() {
221 const auto result = collectDigits();

Callers 1

CodeWidgetMethod · 0.80

Calls 3

setDigitMethod · 0.80
removeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected