| 274 | } |
| 275 | |
| 276 | bool Application::waitForConnected() |
| 277 | { |
| 278 | auto isConnected = m_connection.isConnected(); |
| 279 | auto checkStatus = std::function<void(SyncthingStatus)>([this, &isConnected](SyncthingStatus) { isConnected = m_connection.isConnected(); }); |
| 280 | auto errorConn = signalInfo(&m_connection, &SyncthingConnection::error); |
| 281 | auto statusChangedConn = signalInfo(&m_connection, &SyncthingConnection::statusChanged, checkStatus, &isConnected); |
| 282 | return waitForSignalsOrFail(std::bind(static_cast<void (SyncthingConnection::*)(SyncthingConnectionSettings &)>(&SyncthingConnection::reconnect), |
| 283 | ref(m_connection), ref(m_settings)), |
| 284 | m_generalTimeout, errorConn, statusChangedConn); |
| 285 | } |
| 286 | |
| 287 | bool Application::waitForConfig() |
| 288 | { |
no test coverage detected