mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
fixed compilation by modifying wrappers to account for the shared_ptr mService
This commit is contained in:
parent
009ed54ce2
commit
b8b7d103e1
9 changed files with 33 additions and 57 deletions
|
@ -45,7 +45,6 @@ WebuiPage::WebuiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/)
|
|||
{
|
||||
ui.setupUi(this);
|
||||
connect(ui.enableWebUI_CB, SIGNAL(clicked(bool)), this, SLOT(onEnableCBClicked(bool)));
|
||||
connect(ui.port_SB, SIGNAL(valueChanged(int)), this, SLOT(onPortValueChanged(int)));
|
||||
connect(ui.allIp_CB, SIGNAL(clicked(bool)), this, SLOT(onAllIPCBClicked(bool)));
|
||||
connect(ui.apply_PB, SIGNAL(clicked()), this, SLOT(onApplyClicked()));
|
||||
connect(ui.password_LE, SIGNAL(textChanged(QString)), this, SLOT(onPasswordValueChanged(QString)));
|
||||
|
@ -75,8 +74,6 @@ bool WebuiPage::updateParams(QString &errmsg)
|
|||
bool changed = false;
|
||||
if(ui.enableWebUI_CB->isChecked() != Settings->getWebinterfaceEnabled())
|
||||
changed = true;
|
||||
if(ui.port_SB->value() != Settings->getWebinterfacePort())
|
||||
changed = true;
|
||||
if(ui.allIp_CB->isChecked() != Settings->getWebinterfaceAllowAllIps())
|
||||
changed = true;
|
||||
if(ui.webInterfaceFiles_LE->text() != Settings->getWebinterfaceFilesDirectory())
|
||||
|
@ -86,7 +83,6 @@ bool WebuiPage::updateParams(QString &errmsg)
|
|||
{
|
||||
// store config
|
||||
Settings->setWebinterfaceEnabled(ui.enableWebUI_CB->isChecked());
|
||||
Settings->setWebinterfacePort(ui.port_SB->value());
|
||||
Settings->setWebinterfaceAllowAllIps(ui.allIp_CB->isChecked());
|
||||
Settings->setWebinterfaceFilesDirectory(ui.webInterfaceFiles_LE->text());
|
||||
}
|
||||
|
@ -123,7 +119,6 @@ void WebuiPage::load()
|
|||
{
|
||||
std::cerr << "WebuiPage::load()" << std::endl;
|
||||
whileBlocking(ui.enableWebUI_CB)->setChecked(Settings->getWebinterfaceEnabled());
|
||||
whileBlocking(ui.port_SB)->setValue(Settings->getWebinterfacePort());
|
||||
whileBlocking(ui.webInterfaceFiles_LE)->setText(Settings->getWebinterfaceFilesDirectory());
|
||||
whileBlocking(ui.allIp_CB)->setChecked(Settings->getWebinterfaceAllowAllIps());
|
||||
|
||||
|
@ -149,9 +144,7 @@ QString WebuiPage::helpText() const
|
|||
if(!Settings->getWebinterfaceEnabled())
|
||||
return false;
|
||||
|
||||
rsWebUI->setListeningPort(Settings->getWebinterfacePort());
|
||||
rsWebUI->setHtmlFilesDirectory(Settings->getWebinterfaceFilesDirectory().toStdString());
|
||||
|
||||
rsWebUI->restart();
|
||||
|
||||
return true;
|
||||
|
@ -215,5 +208,6 @@ void WebuiPage::onApplyClicked()
|
|||
|
||||
void WebuiPage::onStartWebBrowserClicked()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QString("http://localhost:")+QString::number(ui.port_SB->value())));
|
||||
QDesktopServices::openUrl(QUrl(QString("http://localhost:")+QString::number(rsJsonAPI->listeningPort())));
|
||||
}
|
||||
|
||||
|
|
|
@ -33,33 +33,27 @@
|
|||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="port_Label">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Listening port:</string>
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="port_SB">
|
||||
<property name="minimum">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1984</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Web interface directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="password_LE">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="webInterfaceFiles_LE">
|
||||
|
@ -84,24 +78,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="password_LE">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="allIp_CB">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Allow access from all IP addresses (Default: localhost only)</string>
|
||||
</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue