diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 0ebfa8737..dfb920982 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -18,7 +18,7 @@ configure_file(dbushelper.h.in ${CMAKE_CURRENT_BINARY_DIR}/dbushelper.h) add_subdirectory(backends/lan) add_subdirectory(backends/loopback) -option(MDNS_ENABLED "Use MDNS for device discovery" OFF) +option(MDNS_ENABLED "Use MDNS for device discovery (under development)" OFF) if (MDNS_ENABLED) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DNSSD) endif() diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index 741b3fde0..3d72c6b49 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -46,7 +46,7 @@ LanLinkProvider::LanLinkProvider(bool testMode, quint16 udpBroadcastPort, quint1 , m_udpListenPort(udpListenPort) , m_testMode(testMode) , m_combineBroadcastsTimer(this) -#ifdef KDECONNET_MDNS +#ifdef KDECONNECT_MDNS , m_mdnsDiscovery(this) #endif { @@ -107,7 +107,7 @@ void LanLinkProvider::onStart() broadcastUdpIdentityPacket(); -#ifdef KDECONNET_MDNS +#ifdef KDECONNECT_MDNS m_mdnsDiscovery.startAnnouncing(); m_mdnsDiscovery.startDiscovering(); #endif @@ -117,7 +117,7 @@ void LanLinkProvider::onStart() void LanLinkProvider::onStop() { -#ifdef KDECONNET_MDNS +#ifdef KDECONNECT_MDNS m_mdnsDiscovery.stopAnnouncing(); m_mdnsDiscovery.stopDiscovering(); #endif @@ -146,7 +146,7 @@ void LanLinkProvider::broadcastToNetwork() Q_ASSERT(m_tcpPort != 0); broadcastUdpIdentityPacket(); -#ifdef KDECONNET_MDNS +#ifdef KDECONNECT_MDNS m_mdnsDiscovery.stopDiscovering(); m_mdnsDiscovery.startDiscovering(); #endif diff --git a/core/backends/lan/lanlinkprovider.h b/core/backends/lan/lanlinkprovider.h index ce54af16c..1939cff11 100644 --- a/core/backends/lan/lanlinkprovider.h +++ b/core/backends/lan/lanlinkprovider.h @@ -18,7 +18,7 @@ #include "kdeconnectcore_export.h" #include "landevicelink.h" #include "server.h" -#ifdef KDECONNET_MDNS +#ifdef KDECONNECT_MDNS #include "mdnsdiscovery.h" #endif @@ -93,7 +93,7 @@ private: const bool m_testMode; QTimer m_combineBroadcastsTimer; -#ifdef KDECONNET_MDNS +#ifdef KDECONNECT_MDNS MdnsDiscovery m_mdnsDiscovery; #endif }; diff --git a/core/backends/lan/mdnsdiscovery.cpp b/core/backends/lan/mdnsdiscovery.cpp index 9232aa2bb..218e15277 100644 --- a/core/backends/lan/mdnsdiscovery.cpp +++ b/core/backends/lan/mdnsdiscovery.cpp @@ -21,13 +21,13 @@ MdnsDiscovery::MdnsDiscovery(LanLinkProvider *lanLinkProvider) { switch (KDNSSD::ServiceBrowser::isAvailable()) { case KDNSSD::ServiceBrowser::Stopped: - qWarning() << "mDNS or Avahi daemons are not running, mDNS discovery not available"; + qCWarning(KDECONNECT_CORE) << "mDNS or Avahi daemons are not running, mDNS discovery not available"; break; case KDNSSD::ServiceBrowser::Working: qCDebug(KDECONNECT_CORE) << "mDNS discovery is available"; break; case KDNSSD::ServiceBrowser::Unsupported: - qWarning() << "mDNS discovery not available (library built without DNS-SD support)"; + qCWarning(KDECONNECT_CORE) << "mDNS discovery not available (library built without DNS-SD support)"; break; } } @@ -63,7 +63,7 @@ void MdnsDiscovery::startAnnouncing() if (successful) { qCDebug(KDECONNECT_CORE) << "MDNS published successfully"; } else { - qWarning() << "MDNS failed to publish"; + qCWarning(KDECONNECT_CORE) << "MDNS failed to publish"; } });