[PATCH] Fix crash returning from found file

David Faure david at mandrakesoft.com
Mon Sep 30 10:41:01 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 29 September 2002 23:27, John Firebaugh wrote:
> The attached patch fixes several issues with returning from the preview of a 
> found file.
> 
> http://bugs.kde.org/show_bug.cgi?id=47503
> 
> The most serious issue was that it was possible for 
> KParts::BrowserExtension::saveState() to be called from inside 
> KParts::BrowserExtension::restoreState() on the same history entry. 

Ouch. Another side effect of the synchronous dirlister (due to the cache), I guess.

> The 
> result was that the data from which the state was being restored could be 
> overwritten and then the restore failed. This patch fixes this by changing 
> KonqView::slotCompleted() to not call updateHistoryEntry(). 

Ok. I hope the "mostly" in the comment doesn't mean that there are other things
to save at this point.....

> The other issue 
> is with the order in which the state is restored. Basically, it needs to 
> happen in this way:
> 
> 1. KonqDirPart::restoreState() (and derived class overrides)
> 2. KParts::BrowserExtension::restoreState() (calls openURL())
> 3. Restoration of the find part.
> 
> Basically, 2 and 3 were reversed, meaning the find part was restored, but then 
> openURL() was called and it was closed again. I've added a 
> KonqDirPartBrowserExtension that enforces the correct ordering.

Excellent idea!
Please commit.

> There are still a few broken things: the found items are not restored with the 
> correct URLS, and previewing a found item from the icon view still crashes. 
Ouch :}

- -- 
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/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9mBwt72KcVAmwbhARAp05AKCpCpDzBx86SksJo38hxyyonUi/+QCgsa49
msRTpHcV5uefMMb5aVoxdIU=
=NEWD
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list