<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/128205/">https://git.reviewboard.kde.org/r/128205/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On Июнь 17th, 2016, 12:42 д.п. MSK, <b>Albert Astals Cid</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">How hard is to add a unit test to prove this is needed+so it doesn't break again in the future?</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've added this Python test case: http://commits.kde.org/kross-interpreters/b5a9d7320d02b5cbaa4cbef25341851849cc9d7a</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It's possible to add the same into the qtscript unit test (in kross.git), but don't think it should be a priority.</p></pre>
<br />
<p>- Alexander</p>
<br />
<p>On Июнь 16th, 2016, 1:04 п.п. MSK, Alexander Potashev wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks and Friedrich W. H. Kossebau.</div>
<div>By Alexander Potashev.</div>
<p style="color: grey;"><i>Updated Июнь 16, 2016, 1:04 п.п.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kross
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In the Python2 interpreter plugin we constuct a QVariant from a typeId
and a pointer to the data. When a method returns e.g. a QVariantMap
in a QVariant, the typeId is QVariant::Map, but toVoidStar() used to
point to the memory where the wrapper QVariant was stored, but the QMap
is actually stored elsewhere, because QTypeInfo<QVariantMap>::isStatic
is true.
It wasn't crashing with Qt4 because in Qt4 QVariantMap was stored in the
QVariant's internal store (the C++ union).
We add template specialization MetaTypeVariant<QVariant> to handle
QVariants differently: now we directly return QVariant::data().</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This method does not crash anymore when called from a Python2 script:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">QVariant returnEmptyMap()
{
return QVariantMap();
}
</pre></div>
</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/core/metatype.h <span style="color: grey">(5ffb9761377555bd0e664fa95828f1b43da7a9b3)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/128205/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>