refactor(Nexus): Remove static getCameraSource

On path towards removing Nexus singleton.
pull/6639/head
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.setMessageBoxManager(messageBoxManager.get());
nexus.setIpc(ipc.get());
auto& cameraSource = Nexus::getCameraSource();
auto& cameraSource = nexus.getCameraSource();
// Autologin
// TODO (kriby): Shift responsibility of linking views to model objects from nexus
// Further: generate view instances separately (loginScreen, mainGUI, audio)

View File

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

View File

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