| 234 | } |
| 235 | |
| 236 | void VersionPage::updateVersionControls() |
| 237 | { |
| 238 | // FIXME: this is a dirty hack |
| 239 | auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft")); |
| 240 | |
| 241 | ui->actionInstall_Forge->setEnabled(controlsEnabled); |
| 242 | |
| 243 | bool supportsNeoForge = minecraftVersion >= Version("1.20.1"); |
| 244 | ui->actionInstall_NeoForge->setEnabled(controlsEnabled && supportsNeoForge); |
| 245 | |
| 246 | bool supportsFabric = minecraftVersion >= Version("1.14"); |
| 247 | ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric); |
| 248 | |
| 249 | bool supportsQuilt = minecraftVersion >= Version("1.14"); |
| 250 | ui->actionInstall_Quilt->setEnabled(controlsEnabled && supportsQuilt); |
| 251 | |
| 252 | bool supportsLiteLoader = minecraftVersion <= Version("1.12.2"); |
| 253 | ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && supportsLiteLoader); |
| 254 | |
| 255 | updateButtons(); |
| 256 | } |
| 257 | |
| 258 | void VersionPage::updateButtons(int row) |
| 259 | { |
nothing calls this directly
no test coverage detected