mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
solid: remove redundant ClientPrivate::init()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
70e4a81bfb
commit
c87af25286
2 changed files with 1 additions and 12 deletions
|
@ -49,12 +49,9 @@ class DevicePrivate
|
|||
class ClientPrivate
|
||||
{
|
||||
public:
|
||||
enum ListenToWhat { ListenToList, ListenToNone };
|
||||
|
||||
ClientPrivate(Client *q_);
|
||||
~ClientPrivate();
|
||||
|
||||
void init(const QStringList &subsystemList, ListenToWhat what);
|
||||
void setWatchedSubsystems(const QStringList &subsystemList);
|
||||
void _uq_monitorReadyRead(int fd);
|
||||
DeviceList deviceListFromEnumerate(struct udev_enumerate *en);
|
||||
|
|
|
@ -40,13 +40,6 @@ ClientPrivate::~ClientPrivate()
|
|||
udev_monitor_unref(monitor);
|
||||
}
|
||||
|
||||
void ClientPrivate::init(const QStringList &subsystemList, ListenToWhat what)
|
||||
{
|
||||
if (what != ListenToNone) {
|
||||
setWatchedSubsystems(subsystemList);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientPrivate::setWatchedSubsystems(const QStringList &subsystemList)
|
||||
{
|
||||
// create a listener
|
||||
|
@ -145,14 +138,13 @@ Client::Client(QObject *parent)
|
|||
: QObject(parent)
|
||||
, d(new ClientPrivate(this))
|
||||
{
|
||||
d->init(QStringList(), ClientPrivate::ListenToNone);
|
||||
}
|
||||
|
||||
Client::Client(const QStringList& subsystemList, QObject *parent)
|
||||
: QObject(parent)
|
||||
, d(new ClientPrivate(this))
|
||||
{
|
||||
d->init(subsystemList, ClientPrivate::ListenToList);
|
||||
setWatchedSubsystems(subsystemList);
|
||||
}
|
||||
|
||||
Client::~Client()
|
||||
|
|
Loading…
Add table
Reference in a new issue