mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
Add ability to send custom HTTP headers
This commit is contained in:
parent
f1d02c6aee
commit
bb80b378c1
8 changed files with 123 additions and 0 deletions
|
@ -503,6 +503,8 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||
connect(m_ui->DNSPasswordTxt, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->groupAltWebUI, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->textWebUIRootFolder, &FileSystemPathLineEdit::selectedPathChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->groupWebUIAddCustomHTTPHeaders, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->textWebUICustomHTTPHeaders, &QPlainTextEdit::textChanged, this, &OptionsDialog::enableApplyButton);
|
||||
#endif // DISABLE_WEBUI
|
||||
|
||||
// RSS tab
|
||||
|
@ -862,6 +864,9 @@ void OptionsDialog::saveOptions()
|
|||
// Alternative UI
|
||||
pref->setAltWebUiEnabled(m_ui->groupAltWebUI->isChecked());
|
||||
pref->setWebUiRootFolder(m_ui->textWebUIRootFolder->selectedPath());
|
||||
// Custom HTTP headers
|
||||
pref->setWebUICustomHTTPHeadersEnabled(m_ui->groupWebUIAddCustomHTTPHeaders->isChecked());
|
||||
pref->setWebUICustomHTTPHeaders(m_ui->textWebUICustomHTTPHeaders->toPlainText());
|
||||
}
|
||||
// End Web UI
|
||||
// End preferences
|
||||
|
@ -1242,6 +1247,9 @@ void OptionsDialog::loadOptions()
|
|||
|
||||
m_ui->groupAltWebUI->setChecked(pref->isAltWebUiEnabled());
|
||||
m_ui->textWebUIRootFolder->setSelectedPath(pref->getWebUiRootFolder());
|
||||
// Custom HTTP headers
|
||||
m_ui->groupWebUIAddCustomHTTPHeaders->setChecked(pref->isWebUICustomHTTPHeadersEnabled());
|
||||
m_ui->textWebUICustomHTTPHeaders->setPlainText(pref->getWebUICustomHTTPHeaders());
|
||||
// End Web UI preferences
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue