[PATCH] Fix crash returning from found file

John Firebaugh jfirebaugh at kde.org
Sun Sep 29 22:27:39 BST 2002


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. 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(). 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.

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. 
I'll take a look at these later today.

Please CC me on reply; I'm not subscribed.

-John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find.diff
Type: text/x-diff
Size: 14297 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020929/f8c2c30b/attachment.diff>


More information about the kfm-devel mailing list