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:
parent
d4421c7161
commit
0e7da7378f
|
@ -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)
|
||||
|
|
|
@ -333,7 +333,7 @@ void Nexus::setParser(QCommandLineParser* parser_)
|
|||
|
||||
CameraSource& Nexus::getCameraSource()
|
||||
{
|
||||
return *getInstance().cameraSource;
|
||||
return *cameraSource;
|
||||
}
|
||||
|
||||
void Nexus::setMessageBoxManager(IMessageBoxManager* messageBoxManager_)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user