From kde-devel Tue Nov 09 20:15:36 1999 From: David Faure Date: Tue, 09 Nov 1999 20:15:36 +0000 To: kde-devel Subject: Re: QMap bug ? (Re: kioslaves don't die?) X-MARC-Message: https://marc.info/?l=kde-devel&m=94217851219878 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. 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 ? > We should find out quickly whether we have to change or QT. I don't even see how we could change this in our code. We can't call insertMulti() since it's in QMapPrivate... Torben : help ! :-) -- David FAURE david@mandrakesoft.com, faure@kde.org http://home.clara.net/faure/ KDE, Making The Future of Computing Available Today