GH-1227 display some messages when MCEdit isn't setup or fails

This commit is contained in:
Petr Mrázek 2015-09-14 02:23:40 +02:00
parent 8ef07ec634
commit cfd5976471

View File

@ -186,7 +186,16 @@ void WorldListPage::on_mcEditBtn_clicked()
#endif #endif
if(program.size()) if(program.size())
{ {
QProcess::startDetached(program, QStringList() << fullPath, mceditPath); qint64 pid = 0;
QProcess::startDetached(program, QStringList() << fullPath, mceditPath, &pid);
if(pid == 0)
{
QMessageBox::warning(this->parentWidget(), tr("MCEdit failed to start!"), tr("MCEdit failed to start.\nIt may be necessary to reinstall it."));
}
}
else
{
QMessageBox::warning(this->parentWidget(), tr("No MCEdit found or set up!"), tr("You do not have MCEdit set up or it was moved.\nYou can set it up in the global settings."));
} }
#endif #endif
} }