Modernize code

This commit is contained in:
Carl Schwan 2024-11-03 22:27:45 +01:00
parent 976c400489
commit e62e31ec09
No known key found for this signature in database
GPG key ID: 02325448204E452A

View file

@ -48,12 +48,11 @@ LanLinkProvider::LanLinkProvider(bool testMode, bool isDisabled)
, m_tcpPort(0) , m_tcpPort(0)
, m_testMode(testMode) , m_testMode(testMode)
, m_combineNetworkChangeTimer(this) , m_combineNetworkChangeTimer(this)
, m_disabled(isDisabled)
#ifdef KDECONNECT_MDNS #ifdef KDECONNECT_MDNS
, m_mdnsDiscovery(this) , m_mdnsDiscovery(this)
#endif #endif
{ {
this->m_disabled = isDisabled;
m_combineNetworkChangeTimer.setInterval(0); // increase this if waiting a single event-loop iteration is not enough m_combineNetworkChangeTimer.setInterval(0); // increase this if waiting a single event-loop iteration is not enough
m_combineNetworkChangeTimer.setSingleShot(true); m_combineNetworkChangeTimer.setSingleShot(true);
connect(&m_combineNetworkChangeTimer, &QTimer::timeout, this, &LanLinkProvider::combinedOnNetworkChange); connect(&m_combineNetworkChangeTimer, &QTimer::timeout, this, &LanLinkProvider::combinedOnNetworkChange);