void DevicesModel::objectsAvailable(bool available) { UDisksClient *client = qobject_cast<UDisksClient *>(sender()); foreach (const UDisksObject::Ptr &object, client->getObjects(UDisksObject::Drive)) { objectAdded(object); } }
UDisksObject::List UDisksJob::objectsPtr() const { UDisksObject::List ret; auto object = qobject_cast<UDisksObject*>(parent()); if (object) { UDisksClient *client = object->client(); if (client) { ret = client->getObjects(objects()); } } return ret; }