QtDBus. How to call a method taking a QDBusUnixFileDescriptor as parameter

293 Views Asked by At

I have a D-Bus method that takes a QDBusUnixFileDescriptor as a parameter. But I do not know how to call this method via the bus.

The documentation for QDBusUnixFileDescriptor states:

This allows applications to send and receive Unix file descriptors over the D-Bus connection, mapping automatically to the D-Bus type 'h'.

To call other methods I am using QDBusInterface::call which takes the method name and a bunch of QVariants. QVariant is not implemented for QDBusUnixFileDescriptor.

I've been unable to locate any examples either in Qt documentation, at github, or with google.

How can I call a bus method that takes a QDBusUnixFileDescriptor as a parameter?

1

There are 1 best solutions below

0
Egor Kovalenchik On

I am rather new in Qt, but as good as I know you can check

QVariant::fromValue(yourQDBusUnixFileDescriptor)

Good luck