[PATCH] konqueror crash recovery

David Faure david at mandrakesoft.com
Sat May 25 12:01:58 BST 2002


On Saturday 25 May 2002 12:32, Alexander Kellett wrote:
> On Thu, May 16, 2002 at 08:01:57AM +0200, David Faure wrote:
> > I have nightmares when I see QTextStream, remembering all the problems it gave us
> > in the past - but maybe that's fixed in Qt 3. Anyway, opening the file raw and not
> > using QTextStream sounds faster and safer to me, but maybe for no good reason.
> 
> With this new patch i've taken both of these into consideration
> and settled on a flushing QDataStream. 

Hmm, so this is a binary format now?
In case of filesystem corruption this has bad side effects - reading the crash
logfile could make the app crash, quite a recursive problem ;-)
ksycoca, konq_history and other similar files have shown this problem in the past...
although I remember commits from Waldo for making ksycoca-reading
crash-proof (how?)

What about coming back to a text-based format, but with a more basic
writeBlock(QCString) approach?
 
> Still a number of small things to impove (header with version number)
> and an abstraction into a KCrashBookmarkWriter in the KCrashBookmarkImporter.cc.
> But those can be done later and they distract from the overall theme of 
> the patch in any case.
> 
> How does this one look for commiting?

One compilation-time nitpick: please use "class QFile;" and "class QDataStream;" 
in konq_mainwindow.h, and move the #includes to konq_mainwindow.cpp.

-- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KDE, Making The Future of Computing Available Today





More information about the kfm-devel mailing list