History

making requested changes and fixing compile issue for jenkins

Dante Ruiz committed 8 years ago

Commit c97d6461 parent b665dbe6 files · +7 −22Browse files

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

Unified · Split

interface/src/ConnectionMonitor.cpp+5−5
@@ -21,8 +21,8 @@ · 20 unmodified lines
21 21
22// Because the connection monitor is created at startup, the time we wait on initial load22// Because the connection monitor is created at startup, the time we wait on initial load
23// should be longer to allow the application to initialize.23// should be longer to allow the application to initialize.
24static const int ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 10000;24static const int ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS = 10000;
25static const int DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 5000;25static const int REDIRECT_AFTER_DISCONNECTED_FOR_X_MS = 5000;
26static const QString ERROR_DOMAIN_URL = "file:///~/serverless/redirect.json";26static const QString ERROR_DOMAIN_URL = "file:///~/serverless/redirect.json";
27 27
28void ConnectionMonitor::init() {28void ConnectionMonitor::init() {
@@ -36,17 +36,17 @@ void ConnectionMonitor::init() { · 7 unmodified lines
36 36
37 _timer.setSingleShot(true);37 _timer.setSingleShot(true);
38 if (!domainHandler.isConnected()) {38 if (!domainHandler.isConnected()) {
39 _timer.start(ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS);39 _timer.start(ON_INITIAL_LOAD_REDIRECT_AFTER_DISCONNECTED_FOR_X_MS);
40 }40 }
41 41
42 connect(&_timer, &QTimer::timeout, this, []() {42 connect(&_timer, &QTimer::timeout, this, []() {
43 qDebug() << "ConnectionMonitor: Showing connection failure window";43 qDebug() << "ConnectionMonitor: Redirecting to 404 error domain";
44 qApp->goToErrorDomainURL(REDIRECT_HIFI_ADDRESS);44 qApp->goToErrorDomainURL(REDIRECT_HIFI_ADDRESS);
45 });45 });
46}46}
47 47
48void ConnectionMonitor::startTimer() {48void ConnectionMonitor::startTimer() {
49 _timer.start(DISPLAY_AFTER_DISCONNECTED_FOR_X_MS);49 _timer.start(REDIRECT_AFTER_DISCONNECTED_FOR_X_MS);
50}50}
51 51
52void ConnectionMonitor::stopTimer() {52void ConnectionMonitor::stopTimer() {