From cfd5976471f21d01ce4ba682e7508972ec5cb27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 14 Sep 2015 02:23:40 +0200 Subject: GH-1227 display some messages when MCEdit isn't setup or fails --- application/pages/WorldListPage.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'application/pages/WorldListPage.cpp') diff --git a/application/pages/WorldListPage.cpp b/application/pages/WorldListPage.cpp index be1d58b8..30981978 100644 --- a/application/pages/WorldListPage.cpp +++ b/application/pages/WorldListPage.cpp @@ -186,7 +186,16 @@ void WorldListPage::on_mcEditBtn_clicked() #endif 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 } -- cgit v1.2.3