Swap BaseInstance* -> MinecraftInstance* in many places and remove casts

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad committed 2026-08-05 18:47:14 +01:00
1 parent 8d2528dc10
commit 029d6caac9
47 files changed
+153 -244

No files matched your search

+3 -3
View File
@@ -182,7 +182,7 @@ QStringList getRecommendedJavaVersionsFromVersionList(Meta::VersionList::Ptr lis
return recommendedJavas;
}
InstallDialog::InstallDialog(const QString& uid, BaseInstance* instance, QWidget* parent)
InstallDialog::InstallDialog(const QString& uid, MinecraftInstance* instance, QWidget* parent)
: QDialog(parent), container(new PageContainer(this, QString(), this)), buttons(new QDialogButtonBox(this))
{
auto layout = new QVBoxLayout(this);
@@ -231,8 +231,8 @@ InstallDialog::InstallDialog(const QString& uid, BaseInstance* instance, QWidget
resize(840, 480);
QStringList recommendedJavas;
if (auto mcInst = dynamic_cast<MinecraftInstance*>(instance); mcInst) {
auto mc = mcInst->getPackProfile()->getComponent("net.minecraft");
if (instance != nullptr) {
auto mc = instance->getPackProfile()->getComponent("net.minecraft");
if (mc) {
auto file = mc->getVersionFile(); // no need for load as it should already be loaded
if (file) {