History

AutoUpdate is now a singleton invoked via Dependency Manager, first steps towards QML update notification

Leonardo Murillo committed 11 years ago

Commit b60597a1 parent 2aa7ce58 files · +111 −10Browse files

Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all

Unified · Split

interface/src/Application.cpp+4−1
@@ -143,6 +143,7 @@ · 142 unmodified lines
143143 #include "ui/StandAloneJSConsole.h"
144144 #include "ui/Stats.h"
145145 #include "ui/AddressBarDialog.h"
146+#include "ui/UpdateDialog.h"
146147
147148 // ON WIndows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
148149 #if defined(Q_OS_WIN)
@@ -290,6 +291,7 @@ bool setupEssentials(int& argc, char** argv) { · 141 unmodified lines
290291 auto discoverabilityManager = DependencyManager::set<DiscoverabilityManager>();
291292 auto sceneScriptingInterface = DependencyManager::set<SceneScriptingInterface>();
292293 auto offscreenUi = DependencyManager::set<OffscreenUi>();
294+ auto autoUpdate = DependencyManager::set<AutoUpdate>();
293295
294296 return true;
295297 }
@@ -612,7 +614,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 316 unmodified lines
612614 connect(ddeTracker.data(), &FaceTracker::muteToggled, this, &Application::faceTrackerMuteToggled);
613615 #endif
614616
615− AutoUpdate* applicationUpdater = new AutoUpdate;
617+ auto applicationUpdater = DependencyManager::get<AutoUpdate>();
618+ connect(applicationUpdater.data(), SIGNAL(newVersionIsAvailable()), dialogsManager.data(), SLOT(showUpdateDialog()));
616619 applicationUpdater->checkForUpdate();
617620 }
618621