UDisksObject::Ptr UDisksBlock::driveObjectPtr() const { auto object = qobject_cast<UDisksObject*>(parent()); if (object) { UDisksClient *client = object->client(); if (client) { return client->getObject(drive()); } } return UDisksObject::Ptr(); }
UDisksObject::Ptr UDisksBlock::cryptoBackingDeviceObjectPtr() const { auto object = qobject_cast<UDisksObject*>(parent()); if (object) { UDisksClient *client = object->client(); if (client) { return client->getObject(cryptoBackingDevice()); } } return UDisksObject::Ptr(); }