Modern C++ API - QoS - given url not accepted on Windows

2 posts / 0 new
Last post
Offline
Last seen: 4 years 8 months ago
Joined: 08/25/2015
Posts: 32
Modern C++ API - QoS - given url not accepted on Windows

We're using own xml profiles for our QoS definitions provided via rti:::core::QosProviderParams

dds::core::StringSeq urls;

for(const QString &filename, qosFileList) {

  QString url = QUrl::fromLocalFile(filename);

 urls.push_back(url.toString().toStdString());

}

..

This works fine on Linux but not on Windows.

The problem is, that DDS expects 'file://C:/foo.xml' which is wrong. It must be 'file:///C:/foo.xml' (three '/' after file:) as it is given back by QUrl::toString(), accepted (and corrected to) by Firefox, ... See also wikipedia: https://en.wikipedia.org/wiki/File_URI_scheme#Windows

 A workaround is the replace the three slashes with two on windows but this looks like a ugly hack to me...

Gerardo Pardo's picture
Offline
Last seen: 3 days 20 hours ago
Joined: 06/02/2010
Posts: 602

Hello Christian,

Thank you so much for reporting this! It is indeed ugly.  I have filed an issue (CORE-7011) so we can correct this in a future release.

Gerardo