[bt-devel] I can't do an SVN commit

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Tue Sep 25 05:09:12 MST 2007


On Sun, 23 Sep 2007, Jeremy Erickson wrote:
> 	On a side note, it appear my fix may be more of a workaround than a fix - for
> some reason, Qt is calling the itemActivated() function 3 or 4 times, twice
> with the book that the user wants to open, and once or twice with a null
> pointer instead.  I'm not sure why this behavior is occuring or why we didn't
> have a similar bug with other types of modules.  I did notice that according
> to grep the Bible module viewer doesn't appear to be handling the
> currentItemChanged signal, which is the signal that is being sent with a null
> pointer.  The workaround of wrapping the function body in an if() statement
> checking for a null pointer prevents the crash and allows the user to select
> a book, so that may be good enough.

Qt doc says that "The specified item is the item that was clicked, or 0
if no item was clicked." So catching 0 is good. A small detail: NULL
is depracated, use 0 instead (see Stroustrup).

  Yours,
	Eeli Kaikkonen (Mr.), Oulu, Finland
	e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)



More information about the bt-devel mailing list