Skip to content

Support for QIODevice #6

Description

@daves003

Is it possible to change CryptFileDevice to accept any QIODevice instead of just QFileDevice?

Looking throught the code, most of it seems to already work fine. These are parts I'm not sure about:

  • When opening a device we probably should check bytesAvailable() instead of size(). And if that's 0 we may still want to try and read the header first if the device is sequential.
  • seek(0)here and here won't always work but might be unnecessary.
  • reimplementing seek should check the return value of m_device->seek
  • appending to a device might not work for sequential devices
  • QIODevice::bytesAvailable probably needs an override
  • fileName() only exists for QFileDevice. It might be fine to try and dynamic_cast the device and return an empty string if that fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions