Skip to content

Commit 1d8b3fe

Browse files
committed
RIS_ResourceItemDescriptorFromHeader: Fix build on Qt 5.7
QLatin1String didn't have an end() method in older Qt versions.
1 parent f7df805 commit 1d8b3fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_devices.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,9 @@ QVariantMap RIS_IntrospectButtonEventItem(const ResourceItemDescriptor &rid, con
395395
*/
396396
bool RIS_ResourceItemDescriptorFromHeader(const QHttpRequestHeader &hdr, ResourceItemDescriptor *rid)
397397
{
398+
const auto last = hdr.pathAt(hdr.pathComponentsCount() - 2);
398399
const char *beg = hdr.pathAt(4).data();
399-
const char *end = hdr.pathAt(hdr.pathComponentsCount() - 2).end();
400+
const char *end = last.data() + last.size();
400401

401402
if (beg && end && beg < end)
402403
{

0 commit comments

Comments
 (0)