<table><tr><td style="">ouwerkerk added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5627" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D5627#105881" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D5627#105881</a>, <a href="https://phabricator.kde.org/p/ouwerkerk/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@ouwerkerk</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D5627#105879" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D5627#105879</a>, <a href="https://phabricator.kde.org/p/ltoscano/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@ltoscano</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Do we really need the auto pointer? (just to check if that would bump some requirement, maybe just for one usage is not needed)</p></div>
</blockquote>
<p>Of course not: in each case the appropriate type should be used instead. ;)</p>
<p>For <tt style="background: #ebebeb; font-size: 13px;">load()</tt> the specific check is a bit different:</p></div>
</blockquote>
<p>Actually, scratch that: there is a specific constructor for an invalid <tt style="background: #ebebeb; font-size: 13px;">Game()</tt> and I had assumed that one would inject a <tt style="background: #ebebeb; font-size: 13px;">nullptr</tt> value for the <tt style="background: #ebebeb; font-size: 13px;">puzzle</tt>. <br />
Unfortunately it doesn't which means the <tt style="background: #ebebeb; font-size: 13px;">Game</tt> class must be altered to either do so (change in behaviour) or extended to have an explicit marker which you can test for (e.g. and <tt style="background: #ebebeb; font-size: 13px;">.isNull()</tt> member like <tt style="background: #ebebeb; font-size: 13px;">QString</tt> has.).</p>
<p>By the way, this is also probably why you get the crash when attempting to generate a puzzle from an invalid Game variant! (An uninitialised <tt style="background: #ebebeb; font-size: 13px;">puzzle</tt> pointer, i.e. a wild pointer.)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R417 KSudoku</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5627" rel="noreferrer">https://phabricator.kde.org/D5627</a></div></div><br /><div><strong>To: </strong>stikonas, KDE Games, ltoscano, ouwerkerk<br /></div>