KDirOperator::resetCursor() crash

Jarosław Staniek js at iidea.pl
Tue Oct 16 12:16:31 BST 2007


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.

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi.pl/en, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org




More information about the kde-core-devel mailing list