Don't crash on exit
Review Request #101027 - Created April 5, 2011 and submitted
|José Manuel Santamaría Lema|
Hi, I'm not 100% sure but I tend to think you must not set a QApplication as the parent of a BookmarkProvider. I think the problem is that any BookmarkProvider has QWidgets in its tree of QObjects. Therefore, you will get problems when deleting the children because of this: http://bugreports.qt.nokia.com/browse/QTBUG-16974 So I just deleted some objects in Application::~Application in order to make sure these objects are deleted before the QApplication. Just deleting the BookmarkProvider in Application::~Application would be enough to fix the crash here, but I'm deleting the other objects ... 1 ... because if now or in the future these objects had a QWidget in its object tree I think you might get a crash. 2 ... just in case. By the way, I think the bug mentioned in this request was introduced in this commit 2b4efa406780920631af1166e79d54e54092322a I have push permissions, if you give me the ok I will push this patch to 0.7-branch.
I have built rekonq with the patch; problem solved for me.
Josè, many thanks for your patch and for the interesting Qt-BUG pointed out! I'll ask my Qt-devs around and try to merge your patch in a while. Anyway, I'd like to understand why this bug occurs just in a few systems. Any ideas about?