KDirOperator::resetCursor() crash
Matt Rogers
mattr at kde.org
Tue Oct 16 13:02:35 BST 2007
On Tuesday 16 October 2007 06:16:31 Jarosław Staniek wrote:
> David Faure said the following, On 2007-10-16 13:01:
> > On Tuesday 16 October 2007, Jarosław Staniek wrote:
> >> In my app there is a structure declared with K_GLOBAL_STATIC containing
> >> a pointer to GUI with KFileWidget.
> >
> > I don't think this is a good idea. Complex widgets don't make good
> > "global static" objects, because of the things they might need in their
> > destructors indeed.
> >
> > I don't mind a if(qApp) being added, but I do think that this is a bad
> > idea and that you should create the file widget when you need it, and
> > delete it when you don't need it anymore.
>
> That was my thought as well but since even bad habits shouldn't cause the
> crash I'd like to do both things: (1) avoid having the static GUI parts
> allocated after qApp is destructed (2) commit the fix for sanity.
Could we add an assert instead? Some say that's just as bad as crashing but at
least we can tell people why their app is crashing instead of just
crashing. :)
--
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071016/8e9ad04f/attachment.sig>
More information about the kde-core-devel
mailing list