diff --git a/src/appmanager.cpp b/src/appmanager.cpp index 003ca8d8c..4072a69e4 100644 --- a/src/appmanager.cpp +++ b/src/appmanager.cpp @@ -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) diff --git a/src/nexus.cpp b/src/nexus.cpp index c1b419ab3..3bc1a336c 100644 --- a/src/nexus.cpp +++ b/src/nexus.cpp @@ -333,7 +333,7 @@ void Nexus::setParser(QCommandLineParser* parser_) CameraSource& Nexus::getCameraSource() { - return *getInstance().cameraSource; + return *cameraSource; } void Nexus::setMessageBoxManager(IMessageBoxManager* messageBoxManager_) diff --git a/src/nexus.h b/src/nexus.h index ff9d47169..2f358878f 100644 --- a/src/nexus.h +++ b/src/nexus.h @@ -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);