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

List:       kde-devel
Subject:    Re: QMap bug ? (Re: kioslaves don't die?)
From:       Alexander Feigl <Alexander.Feigl () gmx ! de>
Date:       1999-11-09 21:17:20
[Download RAW message or body]

At Die, 09 Nov 1999 Reginald Stadlbauer wrote:
> On Tue, 09 Nov 1999, David Faure wrote:
> >On Tue, Nov 09, 1999 at 09:03:04PM +0100, Alexander Feigl wrote:
> >> At Die, 09 Nov 1999 David Faure wrote:
> >> > > > > probably I found to cause of the problem : QMap - which is used to store the
> >> > > > > running kioslaves - seems to hold one entry per key only. (protocol in that
> >> > > > > case) I added lots of debugging stuff in kio_job.cpp to find that out.
> >> > > > This
> >> > > > > really explains why processes get "forgotten". Anything we 
> >> > > > > could do against it?
> >> > > > 
> >> > > > Huh ??
> >> > > > A QMap can contain several entries per keys. I don't think that's the real
> >> > > > bug, otherwise a lot of stuff would be broken in KDE !!
> >> > > > 
> >> > > > Well, perhaps you could check QMap's behaviour with a 4-lines test
> >> > > > program... Just to make sure :)
> >> > > > 
> >> > > 4-line test? Hmm. I don't manage it that short. But - what is 
> >> > > wrong with this 30-liner?
> >> > > 
> >> 
> >> *** LOTS OF STUFF SNIPPED ***
> >> 
> >> > > 
> >> > > Can you test it on your machine too?
> >> > 
> >> > Just did. Same behaviour here !
> >> > (Using Qt CVS from 30-Oct-1999)
> >> > 
> >> > But .. reading qmap.h ... insert() calls insertSingle() so this
> >> > would be expected.
> >> > 
> >> > insertMulti() exists but only in QMapPrivate ??!??
> >> > Torben ?
> >> > 
> >> 
> >> The question is : is this a feature or a bug? According to the docs it seems
> >> more like a bug. But looking at the source it looks like intentional.
> >
> >Yes.
> >
> >> Did you write to QT 
> >
> >No ... (not yet)
> >
> >> - or is this list regularly read by some QT people?
> >
> >It is.
> >Torben wrote QMap, AFAIK.
> 
> Yes. Maybe forward him personally to, as he sometimes doesnīt read kde-MLs very
> regular ;-) A mail to qt-bugs also canīt hurt :-)
> 
> >Torben : in case you didn't follow the beginning of this, the problem is that
> >QMap holds one entry per key only. A test program using QMap::insert() proved it.
> >And it seems normal when reading the sources (insert() calls insertSingle()), 
> >but is this the expected behaviour ?
> 
> I havenīt written QMap, but I think thatīs the expected behaviour. 
> 

But what is the function of QMap::replace( const Key& k, const T& v ) then? It
would do exactly the same like QMap::insert , wouldn't it? It would only take
much more CPU cycles. And referring to the docs I read nothing about "one key -
one entry"

Greetings 

Alexander

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

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