summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.cpp
diff options
context:
space:
mode:
authorLoetkolben <sirloetkolben@gmail.com>2014-07-27 15:50:03 +0200
committerJan Dalheimer <jan@dalheimer.de>2014-07-30 21:40:18 +0200
commitc0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f (patch)
tree113e3561122c70b51e97b530c8055bdf91533cb8 /gui/MainWindow.cpp
parente5b393318fb2a143c9520928dd45c697af68f498 (diff)
downloadMultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar
MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar.gz
MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar.lz
MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar.xz
MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.zip
Show a warning if the instance path contains a '!'
The checks and warnings happen the time MMC loads (via QLOG_INFO), the time the GUI starts (via a dialog) and when the user changes the instance path via the settings window.
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r--gui/MainWindow.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index ce03d7b9..d3dc8f6e 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -1533,3 +1533,21 @@ void MainWindow::checkSetDefaultJava()
MMC->settings()->set("JavaPath", QString("java"));
}
}
+
+void MainWindow::checkInstancePathForProblems()
+{
+ QString instanceFolder = MMC->settings()->get("InstanceDir").toString();
+ if (checkProblemticPathJava(QDir(instanceFolder)))
+ {
+ QMessageBox warning;
+ warning.setText(tr(
+ "Your instance folder contains \'!\' and this is known to cause Java problems!"));
+ warning.setInformativeText(
+ tr("You have now three options: <br/>"
+ " - ignore this warning <br/>"
+ " - change the instance dir in the settings <br/>"
+ " - move this installation of MultiMC5 to a different folder"));
+ warning.setDefaultButton(QMessageBox::Ok);
+ warning.exec();
+ }
+}