Add naive Windows Java detection - JavaUtils for finding it on other systems (incomplete)
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ private slots:
|
||||
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::SettingsDialog *ui;
|
||||
};
|
||||
|
@ -33,7 +33,7 @@
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="generalTab">
|
||||
<attribute name="title">
|
||||
|
Reference in New Issue
Block a user