[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] fix rename crash in Konqy
From:       Michael Brade <brade () kde ! org>
Date:       2002-11-03 23:05:00
[Download RAW message or body]


On Sunday 03 November 2002 23:28, David Faure wrote:
> On Sunday 03 November 2002 22:59, Michael Brade wrote:
> > Somehow I have the feeling almost nobody knows how KDirLister works :-\
> > The attached patch essentially reverts AleXXX hack^Hcommit from 5 months
> > ago, removing the renamingFinished() method in KonqBaseListViewWidget and
> > KonqIconViewWidget. In combination with John's patch (which nobody seems
> > to have tested) it crashes Konqy.
> >
> > Here's why: if the renaming succeeds KDirLister will emit deleteItem()
> > and newItems().
>
> But IIRC this happens after the refreshItems signal, coming from
> FileRenamed? Maybe this would provide a solution to this problem?
Hmm? I don't understand the second sentence, or better, the content. To the 
first one: no, not for me. And my solution works with both cases.

> (I realize that my testing might have been done without fam, so maybe
> KDirLister got the events later than with fam..... Just a guess.)
Ahh, yes, that could have been the reason.

> > In general, if after renaming a file with F2 the file is shown with a
> > wrong name it is the fault of KDirLister not emitting the correct signal
> > or a bug in the implementation of the slots connected to its signals.
>
> No, the initial problem, for which this whole thing was done, is:
> if you rename the file to the name of a file that already exists, you get
> the "rename/overwrite/skip dialog", then if you choose cancel, the iconview
> (or listview) will keep showing the new name.
> At the KDirLister nothing happens. But the iconview/listview shows the new
> name right away, before the actual renaming operation, hence the problem.
No, not anymore. That's what I ment with "correct part of John's patch" and 
the comment starting with
// The correct behavior is to show ...
says. Did you actually read the patch? ;-))

> Now I'm a bit confused as to what John's patch was, and what AleXXX's patch
> was, and... whether your patch fixes the above case - I guess not, since it
> removes most of the fix for it?
No, see above. Works fine for me, I even valgrinded it right now to be 100% 
sure. If you can try it without FAM (renaming it to an empty file, to a valid 
name or to an already existig file), that would be cool.

Thanks,
-- 
Michael Brade;                 KDE Developer, Student of Computer Science
  |-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
  °--web: http://www.kde.org/people/michaelb.html

KDE 3: The Next Generation in Desktop Experience


[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic