mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Unify singleton pattern in Profile class
1. Use unified function names `initInstance()` and `freeInstance()` and make them public. 2. Add `freeInstance()` to avoid noise from memory leak detectors. 3. Let `instance()`return a pointer directly to avoid unnecessary indirections when invoking functions.
This commit is contained in:
parent
8b330e3ac0
commit
5de75eff05
9 changed files with 39 additions and 34 deletions
|
@ -156,7 +156,7 @@ namespace
|
|||
torrentParams.restored = true;
|
||||
torrentParams.skipChecking = false;
|
||||
torrentParams.name = fromLTString(root.dict_find_string_value("qBt-name"));
|
||||
torrentParams.savePath = Profile::instance().fromPortablePath(
|
||||
torrentParams.savePath = Profile::instance()->fromPortablePath(
|
||||
Utils::Fs::toUniformPath(fromLTString(root.dict_find_string_value("qBt-savePath"))));
|
||||
torrentParams.disableTempPath = root.dict_find_int_value("qBt-tempPathDisabled");
|
||||
torrentParams.sequential = root.dict_find_int_value("qBt-sequential");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue