Merge branch 'develop'

This commit is contained in:
Petr Mrázek 2013-11-13 00:25:57 +01:00
commit 662b4bc8cb
3 changed files with 24 additions and 24 deletions

View File

@ -22,16 +22,14 @@
#include <gui/Platform.h>
#include <gui/dialogs/CustomMessageBox.h>
ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) :
QDialog(parent),
ui(new Ui::ConsoleWindow),
m_mayclose(true),
proc(mcproc)
ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent)
: QDialog(parent), ui(new Ui::ConsoleWindow), m_mayclose(true), proc(mcproc)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
this->setWindowFlags(Qt::Window);
connect(mcproc, SIGNAL(ended(BaseInstance*)), this, SLOT(onEnded(BaseInstance*)));
connect(mcproc, SIGNAL(ended(BaseInstance *, int, ExitStatus)), this,
SLOT(onEnded(BaseInstance *, int, QProcess::ExitStatus)));
}
ConsoleWindow::~ConsoleWindow()
@ -113,8 +111,10 @@ void ConsoleWindow::closeEvent(QCloseEvent * event)
void ConsoleWindow::on_btnKillMinecraft_clicked()
{
ui->btnKillMinecraft->setEnabled(false);
auto response = CustomMessageBox::selectable(this, tr("Kill Minecraft?"),
tr("This can cause the instance to get corrupted and should only be used if Minecraft is frozen for some reason"),
auto response = CustomMessageBox::selectable(
this, tr("Kill Minecraft?"),
tr("This can cause the instance to get corrupted and should only be used if Minecraft "
"is frozen for some reason"),
QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)->exec();
if (response == QMessageBox::Yes)
proc->killMinecraft();

View File

@ -725,8 +725,8 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console,
SLOT(write(QString, MessageLevel::Enum)));
connect(proc, SIGNAL(ended(BaseInstance *, int, ExitStatus)), this,
SLOT(instanceEnded(BaseInstance *, int, ExitStatus)));
connect(proc, SIGNAL(ended(BaseInstance*,int,QProcess::ExitStatus)), this,
SLOT(instanceEnded(BaseInstance*,int,QProcess::ExitStatus)));
if (instance->settings().get("ShowConsole").toBool())
{

View File

@ -74,7 +74,7 @@ signals:
/**
* @brief emitted when mc has finished and the PostLaunchCommand was run
*/
void ended(BaseInstance *, int code, ExitStatus status);
void ended(BaseInstance *, int code, QProcess::ExitStatus status);
/**
* @brief emitted when we want to log something