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

Method accountDisplayString

launcher/minecraft/auth/AccountData.cpp:479–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479QString AccountData::accountDisplayString() const {
480 switch(type) {
481 case AccountType::AuthlibInjector:
482 case AccountType::Mojang: {
483 return userName();
484 }
485 case AccountType::Offline: {
486 return QObject::tr("<Offline>");
487 }
488 case AccountType::MSA: {
489 if(xboxApiToken.extra.contains("gtg")) {
490 return xboxApiToken.extra["gtg"].toString();
491 }
492 return "Xbox profile missing";
493 }
494 default: {
495 return "Invalid Account";
496 }
497 }
498}
499
500QString AccountData::lastError() const {
501 return errorString;

Callers 2

dataMethod · 0.45
tryNextMethod · 0.45

Calls 2

containsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected