GH-1053 cleanup
This commit is contained in:
parent
5f41886d76
commit
5133b0f34f
@ -162,8 +162,6 @@ void LaunchController::launchInstance()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_launcher->setProfiler(m_profiler);
|
|
||||||
|
|
||||||
if(m_parentWidget)
|
if(m_parentWidget)
|
||||||
{
|
{
|
||||||
m_parentWidget->hide();
|
m_parentWidget->hide();
|
||||||
@ -179,22 +177,20 @@ void LaunchController::launchInstance()
|
|||||||
|
|
||||||
void LaunchController::readyForLaunch()
|
void LaunchController::readyForLaunch()
|
||||||
{
|
{
|
||||||
auto profiler = m_launcher->getProfiler();
|
if (!m_profiler)
|
||||||
|
|
||||||
if (!profiler)
|
|
||||||
{
|
{
|
||||||
m_launcher->launch();
|
m_launcher->launch();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString error;
|
QString error;
|
||||||
if (!profiler->check(&error))
|
if (!m_profiler->check(&error))
|
||||||
{
|
{
|
||||||
m_launcher->abort();
|
m_launcher->abort();
|
||||||
QMessageBox::critical(m_parentWidget, tr("Error"), tr("Couldn't start profiler: %1").arg(error));
|
QMessageBox::critical(m_parentWidget, tr("Error"), tr("Couldn't start profiler: %1").arg(error));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BaseProfiler *profilerInstance = profiler->createProfiler(m_launcher->instance(), this);
|
BaseProfiler *profilerInstance = m_profiler->createProfiler(m_launcher->instance(), this);
|
||||||
|
|
||||||
connect(profilerInstance, &BaseProfiler::readyToLaunch, [this](const QString & message)
|
connect(profilerInstance, &BaseProfiler::readyToLaunch, [this](const QString & message)
|
||||||
{
|
{
|
||||||
|
@ -377,11 +377,8 @@ namespace Ui {
|
|||||||
#include "minecraft/SkinUtils.h"
|
#include "minecraft/SkinUtils.h"
|
||||||
#include "resources/Resource.h"
|
#include "resources/Resource.h"
|
||||||
|
|
||||||
//#include "minecraft/LegacyInstance.h"
|
|
||||||
|
|
||||||
#include <updater/UpdateChecker.h>
|
#include <updater/UpdateChecker.h>
|
||||||
#include <notifications/NotificationChecker.h>
|
#include <notifications/NotificationChecker.h>
|
||||||
#include <tasks/ThreadTask.h>
|
|
||||||
#include <net/CacheDownload.h>
|
#include <net/CacheDownload.h>
|
||||||
|
|
||||||
#include "tools/BaseProfiler.h"
|
#include "tools/BaseProfiler.h"
|
||||||
|
@ -56,16 +56,6 @@ public: /* methods */
|
|||||||
|
|
||||||
void setWorkdir(QString path);
|
void setWorkdir(QString path);
|
||||||
|
|
||||||
BaseProfilerFactory * getProfiler()
|
|
||||||
{
|
|
||||||
return m_profiler;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setProfiler(BaseProfilerFactory * profiler)
|
|
||||||
{
|
|
||||||
m_profiler = profiler;
|
|
||||||
}
|
|
||||||
|
|
||||||
void killProcess();
|
void killProcess();
|
||||||
|
|
||||||
qint64 pid();
|
qint64 pid();
|
||||||
|
Loading…
Reference in New Issue
Block a user