Showing the changes to interface/src/ConnectionMonitor.cpp (1 of 1 file). Show all
Unified · Split
| @@ -33,9 +33,8 @@ void ConnectionMonitor::init() { · 32 unmodified lines | |||
| 33 | connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &ConnectionMonitor::stopTimer); | 33 | connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &ConnectionMonitor::stopTimer); |
| 34 | 34 | ||
| 35 | _timer.setSingleShot(true); | 35 | _timer.setSingleShot(true); |
| 36 | _timer.setInterval(ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); | ||
| 37 | if (!domainHandler.isConnected()) { | 36 | if (!domainHandler.isConnected()) { |
| 38 | _timer.start(); | 37 | _timer.start(ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); |
| 39 | } | 38 | } |
| 40 | 39 | ||
| 41 | connect(&_timer, &QTimer::timeout, this, []() { | 40 | connect(&_timer, &QTimer::timeout, this, []() { |
| @@ -46,8 +45,7 @@ void ConnectionMonitor::init() { · 4 unmodified lines | |||
| 46 | 45 | ||
| 47 | void ConnectionMonitor::startTimer() { | 46 | void ConnectionMonitor::startTimer() { |
| 48 | qDebug() << "ConnectionMonitor: Starting timer"; | 47 | qDebug() << "ConnectionMonitor: Starting timer"; |
| 49 | _timer.setInterval(DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); | 48 | _timer.start(DISPLAY_AFTER_DISCONNECTED_FOR_X_MS); |
| 50 | _timer.start(); | ||
| 51 | } | 49 | } |
| 52 | 50 | ||
| 53 | void ConnectionMonitor::stopTimer() { | 51 | void ConnectionMonitor::stopTimer() { |