v1.0.0-rc.109 #15
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user