Beispiel #1
0
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();
}
Beispiel #2
0
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();
}