|
|
@ -140,7 +140,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ |
|
|
|
|
|
|
|
|
|
|
|
// Load week days (scheduler)
|
|
|
|
// Load week days (scheduler)
|
|
|
|
for(uint i=1; i<=7; ++i) { |
|
|
|
for(uint i=1; i<=7; ++i) { |
|
|
|
#ifdef QT_4_5 |
|
|
|
#if QT_VERSION >= 0x040500 |
|
|
|
schedule_days->addItem(QDate::longDayName(i, QDate::StandaloneFormat)); |
|
|
|
schedule_days->addItem(QDate::longDayName(i, QDate::StandaloneFormat)); |
|
|
|
#else |
|
|
|
#else |
|
|
|
schedule_days->addItem(QDate::longDayName(i)); |
|
|
|
schedule_days->addItem(QDate::longDayName(i)); |
|
|
@ -271,6 +271,11 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ |
|
|
|
adv_layout->addWidget(advancedSettings); |
|
|
|
adv_layout->addWidget(advancedSettings); |
|
|
|
scrollArea_advanced->setLayout(adv_layout); |
|
|
|
scrollArea_advanced->setLayout(adv_layout); |
|
|
|
connect(advancedSettings, SIGNAL(settingsChanged()), this, SLOT(enableApplyButton())); |
|
|
|
connect(advancedSettings, SIGNAL(settingsChanged()), this, SLOT(enableApplyButton())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CLIENT_USURPATION |
|
|
|
|
|
|
|
groupBox_usurpation->setVisible(false); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// Adapt size
|
|
|
|
// Adapt size
|
|
|
|
show(); |
|
|
|
show(); |
|
|
|
loadWindowState(); |
|
|
|
loadWindowState(); |
|
|
@ -447,6 +452,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ |
|
|
|
settings.setValue(QString::fromUtf8("sameDHTPortAsBT"), isDHTPortSameAsBT()); |
|
|
|
settings.setValue(QString::fromUtf8("sameDHTPortAsBT"), isDHTPortSameAsBT()); |
|
|
|
settings.setValue(QString::fromUtf8("DHTPort"), getDHTPort()); |
|
|
|
settings.setValue(QString::fromUtf8("DHTPort"), getDHTPort()); |
|
|
|
settings.setValue(QString::fromUtf8("LSD"), isLSDEnabled()); |
|
|
|
settings.setValue(QString::fromUtf8("LSD"), isLSDEnabled()); |
|
|
|
|
|
|
|
#ifndef CLIENT_USURPATION |
|
|
|
// Peer ID usurpation
|
|
|
|
// Peer ID usurpation
|
|
|
|
switch(comboPeerID->currentIndex()) { |
|
|
|
switch(comboPeerID->currentIndex()) { |
|
|
|
case 3: // KTorrent
|
|
|
|
case 3: // KTorrent
|
|
|
@ -465,6 +471,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ |
|
|
|
default: //qBittorrent
|
|
|
|
default: //qBittorrent
|
|
|
|
Preferences::setPeerID("qB"); |
|
|
|
Preferences::setPeerID("qB"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
settings.setValue(QString::fromUtf8("Encryption"), getEncryptionSetting()); |
|
|
|
settings.setValue(QString::fromUtf8("Encryption"), getEncryptionSetting()); |
|
|
|
Preferences::setMaxRatio(getMaxRatio()); |
|
|
|
Preferences::setMaxRatio(getMaxRatio()); |
|
|
|
Preferences::setMaxRatioAction(comboRatioLimitAct->currentIndex()); |
|
|
|
Preferences::setMaxRatioAction(comboRatioLimitAct->currentIndex()); |
|
|
@ -755,6 +762,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ |
|
|
|
checkPeX->setChecked(Preferences::isPeXEnabled()); |
|
|
|
checkPeX->setChecked(Preferences::isPeXEnabled()); |
|
|
|
checkLSD->setChecked(Preferences::isLSDEnabled()); |
|
|
|
checkLSD->setChecked(Preferences::isLSDEnabled()); |
|
|
|
// Peer ID usurpation
|
|
|
|
// Peer ID usurpation
|
|
|
|
|
|
|
|
#ifdef CLIENT_USURPATION |
|
|
|
QString peer_id = Preferences::getPeerID(); |
|
|
|
QString peer_id = Preferences::getPeerID(); |
|
|
|
if(peer_id == "UT") { |
|
|
|
if(peer_id == "UT") { |
|
|
|
// uTorrent
|
|
|
|
// uTorrent
|
|
|
@ -780,6 +788,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
comboEncryption->setCurrentIndex(Preferences::getEncryptionSetting()); |
|
|
|
comboEncryption->setCurrentIndex(Preferences::getEncryptionSetting()); |
|
|
|
// Ratio limit
|
|
|
|
// Ratio limit
|
|
|
|
floatValue = Preferences::getMaxRatio(); |
|
|
|
floatValue = Preferences::getMaxRatio(); |
|
|
|