Commit cf526221 authored by EXT Arnaud Clère's avatar EXT Arnaud Clère

Fixed pure virtual call due to incorrect lifetime handling

parent b6d98969
......@@ -422,14 +422,13 @@ int main(int argc, char *argv[])
STOP("QDebug",s)
START {
ba.resize(0);
auto s = TextWriter(&ba)
TextWriter(&ba)
<< 1.333333333333f
<< PI
<< ascii
<< false
<< color
;
s.out(); // to prevent the Q_ASSERT triggered by the implicit sequence() started by the first <<
}
STOP("Text",b.buffer())
START {
......@@ -446,7 +445,9 @@ int main(int argc, char *argv[])
START {
ba.resize(0);
QXmlStreamWriter w(&ba);
QXmlWriter(&w).sequence()
QXmlWriter x(&w);
// TODO x.setErrorHandler([](QIdentifierLiteral error, QString context){ return error == qBindUnexpectedEnd ? true : false; }); // to trigger a Q_ASSERT if .out() is forgotten
x.sequence()
.bind(1.333333333333f)
.bind(PI)
.bind(ascii)
......
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