mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
refactor!!!: migrate from shared pointers
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
c64d871a28
commit
549405ab2f
199 changed files with 742 additions and 709 deletions
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include "icons/IconList.h"
|
||||
|
||||
InstanceWindow::InstanceWindow(InstancePtr instance, QWidget* parent) : QMainWindow(parent), m_instance(instance)
|
||||
InstanceWindow::InstanceWindow(BaseInstance* instance, QWidget* parent) : QMainWindow(parent), m_instance(instance)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ InstanceWindow::InstanceWindow(InstancePtr instance, QWidget* parent) : QMainWin
|
|||
|
||||
m_container->addButtons(horizontalLayout);
|
||||
|
||||
connect(m_instance.get(), &BaseInstance::profilerChanged, this, &InstanceWindow::updateButtons);
|
||||
connect(m_instance, &BaseInstance::profilerChanged, this, &InstanceWindow::updateButtons);
|
||||
connect(APPLICATION, &Application::globalSettingsApplied, this, &InstanceWindow::updateButtons);
|
||||
}
|
||||
|
||||
|
|
@ -125,13 +125,13 @@ InstanceWindow::InstanceWindow(InstancePtr instance, QWidget* parent) : QMainWin
|
|||
{
|
||||
auto launchTask = m_instance->getLaunchTask();
|
||||
instanceLaunchTaskChanged(launchTask);
|
||||
connect(m_instance.get(), &BaseInstance::launchTaskChanged, this, &InstanceWindow::instanceLaunchTaskChanged);
|
||||
connect(m_instance.get(), &BaseInstance::runningStatusChanged, this, &InstanceWindow::runningStateChanged);
|
||||
connect(m_instance, &BaseInstance::launchTaskChanged, this, &InstanceWindow::instanceLaunchTaskChanged);
|
||||
connect(m_instance, &BaseInstance::runningStatusChanged, this, &InstanceWindow::runningStateChanged);
|
||||
}
|
||||
|
||||
// set up instance destruction detection
|
||||
{
|
||||
connect(m_instance.get(), &BaseInstance::statusChanged, this, &InstanceWindow::on_instanceStatusChanged);
|
||||
connect(m_instance, &BaseInstance::statusChanged, this, &InstanceWindow::on_instanceStatusChanged);
|
||||
}
|
||||
|
||||
// add ourself as the modpack page's instance window
|
||||
|
|
@ -164,7 +164,7 @@ void InstanceWindow::updateButtons()
|
|||
m_launchButton->setMenu(launchMenu);
|
||||
}
|
||||
|
||||
void InstanceWindow::instanceLaunchTaskChanged(shared_qobject_ptr<LaunchTask> proc)
|
||||
void InstanceWindow::instanceLaunchTaskChanged(LaunchTask* proc)
|
||||
{
|
||||
m_proc = proc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue