Commit 542c8c92 authored by Don C. Bigler's avatar Don C. Bigler Committed by Stefan Brüns
Browse files

BUGFIX: Fix builds for Qt < 5.11.

parent 6b68348b
......@@ -73,7 +73,11 @@ void WSDiscoveryClient::sendProbe(const QList<KDQName> &typeList, const QList<QU
KDSoapMessageAddressingProperties addressing;
addressing.setAddressingNamespace(KDSoapMessageAddressingProperties::Addressing200408);
addressing.setAction(QStringLiteral("http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe"));
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
addressing.setMessageID(QStringLiteral("urn:uuid:") + QUuid::createUuid().toString(QUuid::WithoutBraces));
#else
addressing.setMessageID(QStringLiteral("urn:uuid:") + QUuid::createUuid().toString().remove("{").remove("}"));
#endif
addressing.setDestination(QStringLiteral("urn:schemas-xmlsoap-org:ws:2005:04:discovery"));
addressing.setReplyEndpointAddress(KDSoapMessageAddressingProperties::predefinedAddressToString(KDSoapMessageAddressingProperties::Anonymous));
message.setMessageAddressingProperties(addressing);
......@@ -102,7 +106,11 @@ void WSDiscoveryClient::sendResolve(const QString &endpointReferenceString)
KDSoapMessageAddressingProperties addressing;
addressing.setAddressingNamespace(KDSoapMessageAddressingProperties::Addressing200408);
addressing.setAction(QStringLiteral("http://schemas.xmlsoap.org/ws/2005/04/discovery/Resolve"));
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
addressing.setMessageID(QStringLiteral("urn:uuid:") + QUuid::createUuid().toString(QUuid::WithoutBraces));
#else
addressing.setMessageID(QStringLiteral("urn:uuid:") + QUuid::createUuid().toString().remove("{").remove("}"));
#endif
addressing.setDestination(QStringLiteral("urn:schemas-xmlsoap-org:ws:2005:04:discovery"));
addressing.setReplyEndpointAddress(KDSoapMessageAddressingProperties::predefinedAddressToString(KDSoapMessageAddressingProperties::Anonymous));
message.setMessageAddressingProperties(addressing);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment