Skip to content

Support for move only types in QFuture via takeResult #217

@fluttershydev

Description

@fluttershydev

Qt 6.0 added QFuture::takeResult which allows using move only types with futures, as long as you only get the result once. QCoroFuture uses result, which I believe is the correct default, but I would like a way to opt into using the move version.

As a hack I just took QCoroFuture and modified it a bit, and this works great. Maybe something like co_await QCoroFutureOnce(future) would work, or maybe co_await qCoro(future).moveable().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions