[Kmymoney-devel] Create new schedule
asoliverez at gmail.com
Fri Jul 31 12:21:42 CEST 2009
On Fri, Jul 31, 2009 at 3:04 AM, Cristian Oneţ <onet.cristian at gmail.com>wrote:
> În data de Vineri 31 Iulie 2009 06:19:08 Alvaro Soliverez a scris:
> > "when creating a new schedule there is a failing assert, something to
> > do with a -1 (this also happens in 0.9.3-CVS I think)"
> > I tracked this down to a change in Q_ASSERT in Qt4.
> > In Qt3, when the condition is false, the warning message gets written to
> > standard output and it continues.
> > In Qt4, it prints the warning message and calls qFatal(), which exits the
> > application with a crash.
> > Momentarily, I changed it to a qWarning(), but we should review what is
> > best in these cases.
> > Also, in this case, having fraction == -1 is valid, because a new
> > gets assigned an empty MyMoneyAccount(), which has no fraction and it
> > defaults to -1. Later on, when the user selects an account, the fraction
> > set correctly.
> If the value -1 in a valid situation that I think that the Q_ASSERT had not
> place there. Assertions are made on conditions that the developer always
> expects to be true, no matter what, otherwise the program should not work.
> having fraction == -1 is a valid situation but we, the developers would
> to have a trace of it, than I thing that a qDebug would be more appropriate
> than the qWarning (if the message of the qWarning gets to the user).
The message goes to the standard output, which the user normally does not
Thomas, should we rather change this into a qDebug?
Anyway, it's good to keep this in mind, because there is a number of
Q_ASSERT around, and now we know its behavior has changed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KMyMoney-devel