mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 03:06:37 +03:00
Coalesce changes in the Preferences class in a much shorter timeframe.
This commit is contained in:
parent
ca2dc325f5
commit
93f557b747
1 changed files with 2 additions and 3 deletions
|
@ -103,7 +103,7 @@ Preferences::Preferences() : dirty(false), lock(QReadWriteLock::Recursive) {
|
|||
#endif
|
||||
|
||||
timer.setSingleShot(true);
|
||||
timer.setInterval(15*60*1000);
|
||||
timer.setInterval(5*1000);
|
||||
connect(&timer, SIGNAL(timeout()), SLOT(save()));
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,6 @@ void Preferences::setValue(const QString &key, const QVariant &value) {
|
|||
if (m_data.value(key) == value)
|
||||
return;
|
||||
dirty = true;
|
||||
if (!timer.isActive())
|
||||
timer.start();
|
||||
m_data.insert(key, value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue