MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / updateIssues

Method updateIssues

launcher/minecraft/mod/Resource.cpp:128–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void Resource::updateIssues(const BaseInstance* inst)
129{
130 m_issues.clear();
131
132 if (m_metadata == nullptr) {
133 return;
134 }
135
136 auto mcInst = dynamic_cast<const MinecraftInstance*>(inst);
137 if (mcInst == nullptr) {
138 return;
139 }
140
141 auto profile = mcInst->getPackProfile();
142 QString mcVersion = profile->getComponentVersion("net.minecraft");
143
144 if (!m_metadata->mcVersions.empty() && !m_metadata->mcVersions.contains(mcVersion)) {
145 // delay translation until issues() is called
146 m_issues.append(QT_TR_NOOP("Not marked as compatible with the instance's game version."));
147 }
148}
149
150int Resource::compare(const Resource& other, SortType type) const
151{

Callers 1

applyUpdatesMethod · 0.80

Calls 6

getPackProfileMethod · 0.80
getComponentVersionMethod · 0.80
appendMethod · 0.80
clearMethod · 0.45
emptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected