[Patch] Fix for a problem with loadItem in konqviewmanager

Eduardo Robles Elvira edulix at gmail.com
Sun Apr 20 23:00:13 BST 2008


El Jueves 17 Abril 2008, David Faure escribió:
> On Friday 11 April 2008, Eduardo Robles Elvira wrote:
> > Hello people,
> >
> > As can be seen in KonqFrameContainer::saveConfig(), that function doesn't
> > necesarily save two childs.
>
> Well a KonqFrameContainer is a splitter; I don't really understand how it
> could not have two children, except in error cases.
> Do you have a testcase about how to end up with either child being 0 ?
>
> > But when KonqViewManager::loadItem() is loading a
> > container it wants the container to have obligatory two childs, otherwise
> > it shows with kDebug() a "profile loading error"
>
> Well yes it's sort of an error. I'm fine with the added fallback-loading
> code (if it wouldn't copy/paste existing code but factorize it instead, as
> said on irc), but I would still like us to get rid of the error case where
> a splitter remains with only one child in it. KonqViewManager is supposed
> to get rid of the splitter when this happens.

I think you're right, I was trying to fix a bug which apparently I didn't fix, 
and this doesn't seem to fix the way to fix it anyway, so I will revert the 
changes if you don't mind =)

But actually, you can get a Container with only one children; though that can 
only that it only happens when konqueror is about to crash so it's not an 
expected behavious, as you say.

I think I have tracked down a bit the bug which was not restoring well saved 
windows. The problem happens when you save a window with the navigation panel 
being shown and then try to restore it: loadItem doesn't restore it 
correctly. So I think it's all related to the navigation panel and also to 
ToggleView=true, because if it's false for the vew containing the nav. panel 
then it restores correctly the window (with the nav panel not being shown). 

Now we need to know why the nav panel is not being restored correctly, and how 
to fix it of course =).

-- 
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man." (George Bernard Shaw)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080421/4e026cbc/attachment.sig>


More information about the kfm-devel mailing list