QCoapClient: use the modern invokeMethod() with PMF
Avoids performing a string look up at runtime which function we meant
and possibly failing.
Drive-by be explicit on the connection mode: since both d->connection
and d->protocol were moved to the workerThread, all of these
invocations are Qt::QueuedConnections.
I've verified that none of the functions thus called are overridden via
the meta object system. Only setSocketOption() was dispatched at runtime
to QCoapQUdpConnection - meaning this commit will now suppress:
QMetaObject::invokeMethod: No such method QCoapConnection::setSocketOption(const QVariant &)
if setSocketOption() was ever called on a non-UDP connection (can't
happen right now because there's no API to replace the connection).
Fixing QCoapProtocol's uses of invokeMethod, which are all to
QCoapReply's Q_PRIVATE_SLOT(), is left as an exercise to the reader.
Pick-to: 6.12
Change-Id: I3ce3c12aaa8ebb89f84afffdb19aeb8fc8d2dc75
Reviewed-by: Mate Barany <mate.barany@qt.io>