summaryrefslogtreecommitdiffstats
path: root/application/pages/WorldListPage.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-14 02:23:40 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-14 02:23:40 +0200
commitcfd5976471f21d01ce4ba682e7508972ec5cb27b (patch)
tree58e4ed05d2dcf4d09474fc9de2bbee78a2f8b3b6 /application/pages/WorldListPage.cpp
parent8ef07ec6346a4f9c078184c9497e7c12f5b8c33d (diff)
downloadMultiMC-cfd5976471f21d01ce4ba682e7508972ec5cb27b.tar
MultiMC-cfd5976471f21d01ce4ba682e7508972ec5cb27b.tar.gz
MultiMC-cfd5976471f21d01ce4ba682e7508972ec5cb27b.tar.lz
MultiMC-cfd5976471f21d01ce4ba682e7508972ec5cb27b.tar.xz
MultiMC-cfd5976471f21d01ce4ba682e7508972ec5cb27b.zip
GH-1227 display some messages when MCEdit isn't setup or fails
Diffstat (limited to 'application/pages/WorldListPage.cpp')
-rw-r--r--application/pages/WorldListPage.cpp11
1 files changed, 10 insertions, 1 deletions
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
}