qTox / qTox

qTox is a chat, voice, video, and file transfer IM client using the encrypted peer-to-peer Tox protocol.
https://qtox.github.io/
GNU General Public License v3.0
4.76k stars 1.06k forks source link

Remove singletons, be explicit about dependencies on mutable state #6039

Open iphydf opened 4 years ago

iphydf commented 4 years ago

There are a number of singletons in qTox, which make dependency analysis (for humans) a bit harder. Functions should generally depend only on their parameters (including this) for mutable state. We should avoid global mutable state referenced from all over the place.

Diadlo commented 4 years ago

Nexus -- one love

sudden6 commented 4 years ago

The Plan™ 2.0

sudden6 commented 4 years ago

https://github.com/qTox/qTox/pull/6216 removes the Core singleton.

anthonybilinski commented 2 years ago

DocumentCache gone: https://github.com/qTox/qTox/pull/6557 SmileyPack gone: https://github.com/qTox/qTox/pull/6558 CameraSource gone: https://github.com/qTox/qTox/pull/6559 Settings gone: https://github.com/qTox/qTox/pull/6560 Style (in review): https://github.com/qTox/qTox/pull/6564 GUI (in review): https://github.com/qTox/qTox/pull/6566

The singletons will fall >:D