<br><br><div class="gmail_quote">On Fri, Jul 31, 2009 at 3:04 AM, Cristian Oneţ <span dir="ltr">&lt;<a href="mailto:onet.cristian@gmail.com">onet.cristian@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
În data de Vineri 31 Iulie 2009 06:19:08 Alvaro Soliverez a scris:<br>
<div><div></div><div class="h5">&gt; &quot;when creating a new schedule there is a failing assert, something to<br>
&gt; do with a -1 (this also happens in 0.9.3-CVS I think)&quot;<br>
&gt;<br>
&gt; I tracked this down to a change in Q_ASSERT in Qt4.<br>
&gt; In Qt3, when the condition is false, the warning message gets written to<br>
&gt; standard output and it continues.<br>
&gt; In Qt4, it prints the warning message and calls qFatal(), which exits the<br>
&gt; application with a crash.<br>
&gt;<br>
&gt; Momentarily, I changed it to a qWarning(), but we should review what is<br>
&gt; best in these cases.<br>
&gt;<br>
&gt; Also, in this case, having fraction == -1 is valid, because a new schedule<br>
&gt; gets assigned an empty MyMoneyAccount(), which has no fraction and it<br>
&gt; defaults to -1. Later on, when the user selects an account, the fraction is<br>
&gt; set correctly.<br>
</div></div>If the value -1 in a valid situation that I think that the Q_ASSERT had not<br>
place there. Assertions are made on conditions that the developer always<br>
expects to be true, no matter what, otherwise the program should not work. If<br>
having fraction == -1 is a valid situation but we, the developers would like<br>
to have a trace of it, than I thing that a qDebug would be more appropriate<br>
than the qWarning (if the message of the qWarning gets to the user).<br>
<br>
</blockquote><div><br>The message goes to the standard output, which the user normally does not see.<br>Thomas, should we rather change this into a qDebug?<br><br>Anyway, it&#39;s good to keep this in mind, because there is a number of Q_ASSERT around, and now we know its behavior has changed.<br>
<br>Regards,<br>Alvaro<br></div></div><br>