Commit 109faea9 authored by Volker Krause's avatar Volker Krause
Browse files

Normalize opaque KCalendarCore shared pointer type name

This produces different results between Qt5 and Qt6, Qt6 even includes
the pointer address, which isn't helpful for unit test reference data.
parent 7e5aeba4
......@@ -34,8 +34,12 @@ function dumpValue(value, depth)
empty = false;
}
// implicitly convertible (color, date, etC)
// implicitly convertible (color, date, opaque types, etc)
if (empty) {
let s = value.toString();
if (s.match(/QVariant.*KCalendarCore::Calendar/)) { // normalize opaque shared pointer handle
return 'KCalendarCore::Calendar';
}
return value.toString();
} else {
return obj;
......
[
{
"content": "QVariant(KCalendarCore::Calendar::Ptr, )"
"content": "KCalendarCore::Calendar"
},
{
"childNodes": [
......@@ -78,7 +78,7 @@
]
}
],
"content": "QVariant(KCalendarCore::Calendar::Ptr, )",
"content": "KCalendarCore::Calendar",
"contextDateTime": "Invalid Date",
"isNull": false,
"mimeType": "text/calendar",
......
Supports Markdown
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