mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-16 13:11:36 +03:00
Preferences code clean up
This commit is contained in:
parent
5579c7ff3d
commit
a1272fff82
3 changed files with 74 additions and 93 deletions
|
@ -985,9 +985,9 @@ QGroupBox {
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-84</y>
|
||||||
<width>503</width>
|
<width>503</width>
|
||||||
<height>426</height>
|
<height>462</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_20">
|
<layout class="QVBoxLayout" name="verticalLayout_20">
|
||||||
|
@ -1300,87 +1300,78 @@ QGroupBox {
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_13">
|
<widget class="QGroupBox" name="checkProxyAuth">
|
||||||
<item row="0" column="0">
|
<property name="enabled">
|
||||||
<widget class="QCheckBox" name="checkProxyAuth">
|
<bool>false</bool>
|
||||||
<property name="enabled">
|
</property>
|
||||||
<bool>false</bool>
|
<property name="title">
|
||||||
</property>
|
<string>Authentication</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Authentication</string>
|
<property name="checkable">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="checked">
|
||||||
<item row="0" column="1">
|
<bool>false</bool>
|
||||||
<layout class="QGridLayout" name="gridLayout_12">
|
</property>
|
||||||
<item row="0" column="0">
|
<layout class="QVBoxLayout" name="verticalLayout_24">
|
||||||
<widget class="QLabel" name="lblProxyUsername">
|
<item>
|
||||||
<property name="enabled">
|
<layout class="QGridLayout" name="gridLayout_12">
|
||||||
<bool>false</bool>
|
<item row="0" column="0">
|
||||||
</property>
|
<widget class="QLabel" name="lblProxyUsername">
|
||||||
<property name="text">
|
<property name="enabled">
|
||||||
<string>Username:</string>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="text">
|
||||||
</item>
|
<string>Username:</string>
|
||||||
<item row="0" column="1">
|
</property>
|
||||||
<widget class="QLineEdit" name="textProxyUsername">
|
</widget>
|
||||||
<property name="enabled">
|
</item>
|
||||||
<bool>false</bool>
|
<item row="0" column="1">
|
||||||
</property>
|
<widget class="QLineEdit" name="textProxyUsername">
|
||||||
<property name="text">
|
<property name="enabled">
|
||||||
<string/>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="text">
|
||||||
<number>1000</number>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="echoMode">
|
<property name="maxLength">
|
||||||
<enum>QLineEdit::Normal</enum>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="echoMode">
|
||||||
</item>
|
<enum>QLineEdit::Normal</enum>
|
||||||
<item row="1" column="0">
|
</property>
|
||||||
<widget class="QLabel" name="lblProxyPassword">
|
</widget>
|
||||||
<property name="enabled">
|
</item>
|
||||||
<bool>false</bool>
|
<item row="1" column="0">
|
||||||
</property>
|
<widget class="QLabel" name="lblProxyPassword">
|
||||||
<property name="text">
|
<property name="enabled">
|
||||||
<string>Password:</string>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="text">
|
||||||
</item>
|
<string>Password:</string>
|
||||||
<item row="1" column="1">
|
</property>
|
||||||
<widget class="QLineEdit" name="textProxyPassword">
|
</widget>
|
||||||
<property name="enabled">
|
</item>
|
||||||
<bool>false</bool>
|
<item row="1" column="1">
|
||||||
</property>
|
<widget class="QLineEdit" name="textProxyPassword">
|
||||||
<property name="text">
|
<property name="enabled">
|
||||||
<string/>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="text">
|
||||||
<number>1000</number>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="echoMode">
|
<property name="maxLength">
|
||||||
<enum>QLineEdit::Password</enum>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="echoMode">
|
||||||
</item>
|
<enum>QLineEdit::Password</enum>
|
||||||
</layout>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="0" column="2">
|
</item>
|
||||||
<spacer>
|
</layout>
|
||||||
<property name="orientation">
|
</item>
|
||||||
<enum>Qt::Horizontal</enum>
|
</layout>
|
||||||
</property>
|
</widget>
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -113,7 +113,6 @@ options_imp::options_imp(QWidget *parent):
|
||||||
// Connect signals / slots
|
// Connect signals / slots
|
||||||
// Proxy tab
|
// Proxy tab
|
||||||
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int)));
|
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int)));
|
||||||
connect(checkProxyAuth, SIGNAL(toggled(bool)), this, SLOT(enableProxyAuth(bool)));
|
|
||||||
|
|
||||||
// Apply button is activated when a value is changed
|
// Apply button is activated when a value is changed
|
||||||
// General tab
|
// General tab
|
||||||
|
@ -589,7 +588,6 @@ void options_imp::loadOptions(){
|
||||||
checkProxyAuth->setChecked(pref.isProxyAuthEnabled());
|
checkProxyAuth->setChecked(pref.isProxyAuthEnabled());
|
||||||
textProxyUsername->setText(pref.getProxyUsername());
|
textProxyUsername->setText(pref.getProxyUsername());
|
||||||
textProxyPassword->setText(pref.getProxyPassword());
|
textProxyPassword->setText(pref.getProxyPassword());
|
||||||
enableProxyAuth(checkProxyAuth->isChecked());
|
|
||||||
//}
|
//}
|
||||||
// End Connection preferences
|
// End Connection preferences
|
||||||
// Bittorrent preferences
|
// Bittorrent preferences
|
||||||
|
@ -863,13 +861,6 @@ void options_imp::enableProxy(int index){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void options_imp::enableProxyAuth(bool checked){
|
|
||||||
lblProxyUsername->setEnabled(checked);
|
|
||||||
lblProxyPassword->setEnabled(checked);
|
|
||||||
textProxyUsername->setEnabled(checked);
|
|
||||||
textProxyPassword->setEnabled(checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool options_imp::isSlashScreenDisabled() const {
|
bool options_imp::isSlashScreenDisabled() const {
|
||||||
return !checkShowSplash->isChecked();
|
return !checkShowSplash->isChecked();
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ public:
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void enableProxy(int comboIndex);
|
void enableProxy(int comboIndex);
|
||||||
void enableProxyAuth(bool checked);
|
|
||||||
void on_buttonBox_accepted();
|
void on_buttonBox_accepted();
|
||||||
void closeEvent(QCloseEvent *e);
|
void closeEvent(QCloseEvent *e);
|
||||||
void on_buttonBox_rejected();
|
void on_buttonBox_rejected();
|
||||||
|
|
Loading…
Reference in a new issue