Fix version file problems, fix console window not being destroyed

This commit is contained in:
Petr Mrázek 2014-08-21 00:23:20 +02:00
parent 01ca3d6aad
commit febf3645d0
3 changed files with 7 additions and 2 deletions

View File

@ -55,6 +55,7 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent)
: QMainWindow(parent), m_proc(mcproc)
{
MultiMCPlatform::fixWM_CLASS(this);
setAttribute(Qt::WA_DeleteOnClose);
auto instance = m_proc->instance();
auto icon = MMC->icons()->getIcon(instance->iconKey());
@ -263,3 +264,7 @@ void ConsoleWindow::onLaunchFailed(InstancePtr instance)
if (!isVisible())
show();
}
ConsoleWindow::~ConsoleWindow()
{
}

View File

@ -27,7 +27,7 @@ class ConsoleWindow : public QMainWindow
public:
explicit ConsoleWindow(MinecraftProcess *proc, QWidget *parent = 0);
virtual ~ConsoleWindow() {};
virtual ~ConsoleWindow();
/**
* @brief specify if the window is allowed to close

View File

@ -147,7 +147,7 @@ QString MinecraftVersion::getPatchFilename()
bool MinecraftVersion::needsUpdate()
{
auto settings = MMC->settings();
bool result = hasUpdate() && settings->get("AutoUpdateMinecraftVersions").toBool();
bool result = m_versionSource == Remote || (hasUpdate() && settings->get("AutoUpdateMinecraftVersions").toBool());
return result;
}