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.
This commit is contained in:

committed by
Jan Dalheimer

parent
e5b393318f
commit
c0254d9a75
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user