From b9d429355255d10541fd14799c419a1b5aeeb128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 11 Jul 2019 01:01:47 +0200 Subject: NOISSUE update component buttons some more when the versions change --- api/logic/minecraft/ComponentList.cpp | 3 +++ api/logic/minecraft/ComponentList.h | 3 +++ api/logic/minecraft/MinecraftInstance.h | 3 --- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'api/logic') diff --git a/api/logic/minecraft/ComponentList.cpp b/api/logic/minecraft/ComponentList.cpp index e5c373a4..b2afdb17 100644 --- a/api/logic/minecraft/ComponentList.cpp +++ b/api/logic/minecraft/ComponentList.cpp @@ -635,6 +635,9 @@ void ComponentList::componentDataChanged() qWarning() << "ComponentList got dataChenged signal from a non-Component!"; return; } + if(objPtr->getID() == "net.minecraft") { + emit minecraftChanged(); + } // figure out which one is it... in a seriously dumb way. int index = 0; for (auto component: d->components) diff --git a/api/logic/minecraft/ComponentList.h b/api/logic/minecraft/ComponentList.h index 18beaf60..cb20c559 100644 --- a/api/logic/minecraft/ComponentList.h +++ b/api/logic/minecraft/ComponentList.h @@ -104,6 +104,9 @@ public: /// if there is a save scheduled, do it now. void saveNow(); +signals: + void minecraftChanged(); + public: /// get the profile component by id Component * getComponent(const QString &id); diff --git a/api/logic/minecraft/MinecraftInstance.h b/api/logic/minecraft/MinecraftInstance.h index fac309c2..501697f7 100644 --- a/api/logic/minecraft/MinecraftInstance.h +++ b/api/logic/minecraft/MinecraftInstance.h @@ -113,9 +113,6 @@ public: virtual JavaVersion getJavaVersion() const; -signals: - void versionReloaded(); - protected: QMap createCensorFilterFromSession(AuthSessionPtr session); QStringList validLaunchMethods(); -- cgit v1.2.3