mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-29 03:38:05 -06:00
1. Extract "transaction" support for QSettings into separate class TransactionalSettings. 2. Define macrto with explicit name for the case when this "transaction" support is needed. 3. A bit optimize QHash <-> QSettings copying: replace assign with insert() and remove repetitive key lookups. 4. In save() check dirty status before getting the lock too. The changes from items 1 and 2 make text more structured and the logic of the SettingsStorage class gets separated from the implementation level task of guarding the settings serialization. The changes in 3 and 4 do not make the app much faster, but neither make any harm to the code readability.