Changeset View
Changeset View
Standalone View
Standalone View
src/avahi-remoteservice.cpp
Show All 21 Lines | |||||
22 | #include "avahi-remoteservice_p.h" | 22 | #include "avahi-remoteservice_p.h" | ||
23 | #include <netinet/in.h> | 23 | #include <netinet/in.h> | ||
24 | #include <QEventLoop> | 24 | #include <QEventLoop> | ||
25 | #include <QCoreApplication> | 25 | #include <QCoreApplication> | ||
26 | #include <QDebug> | 26 | #include <QDebug> | ||
27 | #include "remoteservice.h" | 27 | #include "remoteservice.h" | ||
28 | #include "avahi_server_interface.h" | 28 | #include "avahi_server_interface.h" | ||
29 | #include "avahi_serviceresolver_interface.h" | 29 | #include "avahi_serviceresolver_interface.h" | ||
30 | #include "avahi-disconn-handler.h" | ||||
30 | namespace KDNSSD | 31 | namespace KDNSSD | ||
31 | { | 32 | { | ||
32 | 33 | | |||
33 | RemoteService::RemoteService(const QString &name, const QString &type, const QString &domain) | 34 | RemoteService::RemoteService(const QString &name, const QString &type, const QString &domain) | ||
34 | : ServiceBase(new RemoteServicePrivate(this, name, type, domain)) | 35 | : ServiceBase(new RemoteServicePrivate(this, name, type, domain)) | ||
35 | { | 36 | { | ||
37 | QObject::connect(&AvahiDisconnectHandler::instance (), &AvahiDisconnectHandler::avahiDisconnected, this, | ||||
sitter: no need for QObject::
goes for all? other classes as well | |||||
38 | [this]() { | ||||
39 | K_D; | ||||
40 | if(d->m_resolver) { | ||||
sitter: space after if | |||||
41 | delete d->m_resolver; | ||||
42 | d->m_resolver = nullptr; | ||||
43 | d->m_running = false; | ||||
44 | emit resolved(false); | ||||
45 | } | ||||
46 | }); | ||||
36 | } | 47 | } | ||
37 | 48 | | |||
38 | RemoteService::~RemoteService() | 49 | RemoteService::~RemoteService() | ||
39 | { | 50 | { | ||
40 | } | 51 | } | ||
41 | 52 | | |||
42 | bool RemoteService::resolve() | 53 | bool RemoteService::resolve() | ||
43 | { | 54 | { | ||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |
no need for QObject::
goes for all? other classes as well