| 60 | #include "settings/SettingsObject.h" |
| 61 | |
| 62 | JavaPage::JavaPage(QWidget* parent) : QWidget(parent), ui(new Ui::JavaPage) |
| 63 | { |
| 64 | ui->setupUi(this); |
| 65 | |
| 66 | if (BuildConfig.JAVA_DOWNLOADER_ENABLED) { |
| 67 | ui->managedJavaList->initialize(new JavaInstallList(this, true)); |
| 68 | ui->managedJavaList->setResizeOn(2); |
| 69 | ui->managedJavaList->selectCurrent(); |
| 70 | ui->managedJavaList->setEmptyString(tr("No managed Java versions are installed")); |
| 71 | ui->managedJavaList->setEmptyErrorString(tr("Couldn't load the managed Java list!")); |
| 72 | connect(ui->autodetectJavaCheckBox, &QCheckBox::stateChanged, this, [this] { |
| 73 | ui->autodownloadCheckBox->setEnabled(ui->autodetectJavaCheckBox->isChecked()); |
| 74 | if (!ui->autodetectJavaCheckBox->isChecked()) |
| 75 | ui->autodownloadCheckBox->setChecked(false); |
| 76 | }); |
| 77 | } else { |
| 78 | ui->autodownloadCheckBox->setHidden(true); |
| 79 | ui->tabWidget->tabBar()->hide(); |
| 80 | } |
| 81 | |
| 82 | loadSettings(); |
| 83 | updateThresholds(); |
| 84 | } |
| 85 | |
| 86 | JavaPage::~JavaPage() |
| 87 | { |
nothing calls this directly
no test coverage detected