1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(Nexus): Remove static getCameraSource

On path towards removing Nexus singleton.
This commit is contained in:
Anthony Bilinski 2022-03-28 23:33:09 -07:00
parent d4421c7161
commit 0e7da7378f
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
3 changed files with 3 additions and 3 deletions

View File

@ -363,7 +363,7 @@ int AppManager::run()
nexus.setSettings(settings.get()); nexus.setSettings(settings.get());
nexus.setMessageBoxManager(messageBoxManager.get()); nexus.setMessageBoxManager(messageBoxManager.get());
nexus.setIpc(ipc.get()); nexus.setIpc(ipc.get());
auto& cameraSource = Nexus::getCameraSource(); auto& cameraSource = nexus.getCameraSource();
// Autologin // Autologin
// TODO (kriby): Shift responsibility of linking views to model objects from nexus // TODO (kriby): Shift responsibility of linking views to model objects from nexus
// Further: generate view instances separately (loginScreen, mainGUI, audio) // Further: generate view instances separately (loginScreen, mainGUI, audio)

View File

@ -333,7 +333,7 @@ void Nexus::setParser(QCommandLineParser* parser_)
CameraSource& Nexus::getCameraSource() CameraSource& Nexus::getCameraSource()
{ {
return *getInstance().cameraSource; return *cameraSource;
} }
void Nexus::setMessageBoxManager(IMessageBoxManager* messageBoxManager_) void Nexus::setMessageBoxManager(IMessageBoxManager* messageBoxManager_)

View File

@ -59,7 +59,7 @@ public:
static Nexus& getInstance(); static Nexus& getInstance();
static void destroyInstance(); static void destroyInstance();
Profile* getProfile(); Profile* getProfile();
static CameraSource& getCameraSource(); CameraSource& getCameraSource();
void registerIpcHandlers(); void registerIpcHandlers();
bool handleToxSave(const QString& path); bool handleToxSave(const QString& path);