[PATCH] konqueror crash recovery

Alexander Kellett kelletta at eidetica.com
Thu May 16 09:19:43 BST 2002


On Thu, May 16, 2002 at 08:01:57AM +0200, David Faure wrote:
> On Thursday 16 May 2002 01:12, Alexander Kellett wrote: (and snipped by him too)
> > Further doubtfull improvements:
> >    open the file 'raw' to stop possible buffering problems?
> >    shorten the written strings
> >    optimize by replacing iostream use with sprintf
> >    write the urls in a alternate way, are how are url's encoded anyway?
> 
> 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.

Yup, I thought it would be faster, but had not thought about the possibility
of a safety increase, and given those two reasons i'll work on a new patch
including those changes. Thanks for the tip.

> The patch is only about saving the state of Konqueror (while using it
> and not when it crashes, which is good because it's safer than a crashhandler,
> but which has a very small performance hit) - I don't see the code for recovering
> after a crash ... is that in keditbookmarks? How does the user do, to recover
> after a crash?

KEditBookmarks currently has a import labelled "import crashed webpages" 
(can't remember the exact name) that can be used to recover the last
crashed sessions. The UI i'm thinking of implementing next is a small
"Crash recover" submenu in either 'Go' or 'Tools' in Konqueror. The menu
will include the following subitems:
   Crashes (list of the crashes)
   Clear all crashed URLs (with a 'are you sure' message)
   Import crashes into KEditbookmarks (keditbookmarks --crash-recover)

The Crashes submenu would be a refactor of the konqi Bookmarks submenu,
therefore automatically getting the delayed loading. Only difference
would be that the Crashes submenu is fairly difficult to get to and the
import is fairly fast, therefore i'd like to disable 'caching' in some way.

(BTW, I was thinking of doing the kbookmarkimport* API change by simply
 adding the new API for crashes/opera/ie and making Konqueror use a 
 wrapper in libkonq (in the new api style) to the ns imports)

Then I was thinking of moving the crash imports elsewhere in the keditbookmarks
menus (as its really quite a bit of an advanced setting. And possibly making a
.desktop file that loads keditbookmarks with --crash-recover.

> For your point 4: writing url() and reading that into a KURL is ok, that's
> two-ways.
> One thing is that:  bool ? QString : ""  doesn't compile on some picky compilers,
> better use QString::null so that the two expressions are really of the same type.


Okay, shall do. Thanks for the tip.

cheers for the suggestions 
and the question of UI, which i've been 
thinking about for several weeks off and on now :)

Alex

--
kelletta at eidetica.com           (lypanov)           http://lypanov.shacknet.nu




More information about the kfm-devel mailing list