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.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)
|
||||||
|
|
|
@ -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_)
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user