mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-18 10:57:18 -05:00
It makes no sense if the total Transfer rate is lower than the individual rate.
Avoid this due setting uper limit for individual rate, and correct old wrong saved settings. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1160 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bdd56208ac
commit
d870ae4ef2
@ -91,6 +91,12 @@ ServerDialog::save(QString &errmsg)
|
||||
}
|
||||
|
||||
|
||||
/** Change of maxDataRate limits the Individual Data Rate */
|
||||
void ServerDialog::setMaximumIndivRate(int maximum) {
|
||||
ui.indivRate->setMaximum(maximum);
|
||||
}
|
||||
|
||||
|
||||
/** Loads the settings for this page */
|
||||
void ServerDialog::load()
|
||||
{
|
||||
@ -137,10 +143,20 @@ void ServerDialog::load()
|
||||
rsiface->lockData(); /* Lock Interface */
|
||||
|
||||
ui.totalRate->setValue(rsiface->getConfig().maxDataRate);
|
||||
ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate);
|
||||
|
||||
// It makes no sense if the total Transfer rate is lower than the individual rate.
|
||||
// Avoid this due setting uper limit for individual rate, and correct old wrong saved settings.
|
||||
if (rsiface->getConfig().maxDataRate < rsiface->getConfig().maxIndivDataRate) {
|
||||
ui.indivRate->setValue(rsiface->getConfig().maxDataRate);
|
||||
} else {
|
||||
ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate);
|
||||
}
|
||||
QObject::connect(ui.totalRate, SIGNAL (valueChanged(int)),
|
||||
this, SLOT (setMaximumIndivRate(int)));
|
||||
|
||||
rsiface->unlockData(); /* UnLock Interface */
|
||||
|
||||
|
||||
toggleUPnP();
|
||||
|
||||
//ui.check_net->setCheckable(true);
|
||||
@ -171,7 +187,6 @@ void ServerDialog::load()
|
||||
ui.extPort -> setValue(detail.extPort);
|
||||
}
|
||||
|
||||
|
||||
/** Loads the settings for this page */
|
||||
void ServerDialog::updateStatus()
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ private slots:
|
||||
void saveAddresses();
|
||||
void toggleUPnP();
|
||||
void toggleIpDetermination(bool) ;
|
||||
|
||||
void setMaximumIndivRate(int);
|
||||
|
||||
private:
|
||||
/** A RshareSettings object used for saving/loading settings */
|
||||
|
Loading…
Reference in New Issue
Block a user