summaryrefslogtreecommitdiffstats
path: root/gui/settingsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/settingsdialog.cpp')
-rw-r--r--gui/settingsdialog.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp
index 9736c1c7..b5ff8d56 100644
--- a/gui/settingsdialog.cpp
+++ b/gui/settingsdialog.cpp
@@ -13,10 +13,11 @@
* limitations under the License.
*/
+#include <MultiMC.h>
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
+#include "logic/JavaUtils.h"
-#include <MultiMC.h>
#include <settingsobject.h>
#include <QFileDialog>
#include <QMessageBox>
@@ -180,3 +181,11 @@ void SettingsDialog::loadSettings(SettingsObject *s)
ui->preLaunchCmdTextBox->setText(s->get("PreLaunchCommand").toString());
ui->postExitCmdTextBox->setText(s->get("PostExitCommand").toString());
}
+
+void SettingsDialog::on_pushButton_clicked()
+{
+ JavaUtils jut;
+ QStringList paths = jut.FindJavaPath();
+
+ ui->javaPathTextBox->setText(paths.at(0));
+}