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

Function getComponentVersion

launcher/modplatform/atlauncher/ATLPackInstallTask.cpp:1035–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033}
1034
1035static Meta::VersionPtr getComponentVersion(const QString& uid, const QString& version)
1036{
1037 auto vlist = APPLICATION->metadataIndex()->get(uid);
1038 if (!vlist)
1039 return {};
1040
1041 if (!vlist->isLoaded())
1042 vlist->load(Net::Mode::Online);
1043
1044 auto ver = vlist->getVersion(version);
1045 if (!ver)
1046 return {};
1047
1048 if (!ver->isLoaded())
1049 ver->load(Net::Mode::Online);
1050
1051 return ver;
1052}
1053
1054}

Callers 3

onDownloadSucceededMethod · 0.85
downloadModsMethod · 0.85

Calls 5

metadataIndexMethod · 0.80
getMethod · 0.45
isLoadedMethod · 0.45
loadMethod · 0.45
getVersionMethod · 0.45

Tested by

no test coverage detected