v1.0.0-rc.109 #15

Merged
leonarski_f merged 14 commits from 2511-1.0.0-rc.109 into main 2025-11-26 13:49:00 +01:00
Showing only changes of commit 4af12ca340 - Show all commits

View File

@@ -127,12 +127,26 @@ void JFJochViewerMenu::openHttpSelected() {
layout->addWidget(new QLabel(":"), 0, 2);
QLineEdit *hostEdit = new QLineEdit(&dialog);
hostEdit->setText("localhost");
char *host = std::getenv("JUNGFRAUJOCH_HTTP_HOST");
if (host != nullptr)
hostEdit->setText(host);
else
hostEdit->setText("localhost");
layout->addWidget(hostEdit, 0, 1);
QSpinBox *portSpinBox = new QSpinBox(&dialog);
portSpinBox->setRange(1, 65535);
portSpinBox->setValue(5232);
char *port_std = std::getenv("JUNGFRAUJOCH_HTTP_PORT");
if (port_std != nullptr) {
const int tmp = std::stoi(std::string(port_std));
if (tmp < 65536 && tmp > 0)
portSpinBox->setValue(tmp);
} else
portSpinBox->setValue(8080);
layout->addWidget(portSpinBox, 0, 3);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);