Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #68399
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Weird use of maps. |
| Date | 2019-09-13 15:04 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <qlgp77$95o$1@dont-email.me> (permalink) |
| References | (1 earlier) <87ftllb15b.fsf@ID-208667.user.individual.de> <qk791e$a2h$4@dont-email.me> <871rx33kkd.fsf@ID-208667.user.individual.de> <qk9pog$3hu$1@dont-email.me> <qlgdqa$1fg$1@gioia.aioe.org> |
On 9/13/19 11:49 AM, Manfred wrote: > On 8/30/2019 2:14 AM, James Kuyper wrote: >> If he'd used QMap<QString, int> for the part map, and QMap<QSTring, >> QMap<QString, int> > for the message map, it would all have worked fine >> (except for the bug that I fixed), and he would have been able to >> extract the map directly, rather than by calling toMap(). So why did he >> use QVariant instead? I'm getting the impression that he used QVariant >> without bothering to consider whether it was actually needed. > > An abstract reason (i.e. with no sight of the code) is to distinguish > between an empty message and a non existing message: No entry is placed into the message map until the first part of a message is received (and even then, only if it's a multi-part message - single-part messages are handled immediately rather than being saved up waiting for the remaining parts). Therefore, there will always be at least one part of one message for every entry in the map.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 09:30 -0400
Re: Weird use of maps. Jens Kallup <jkallup@web.de> - 2019-08-28 16:22 +0200
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 20:46 -0400
Re: Weird use of maps. Öö Tiib <ootiib@hot.ee> - 2019-08-28 09:00 -0700
Re: Weird use of maps. "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-08-28 14:54 -0700
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 20:58 -0400
Re: Weird use of maps. David Brown <david.brown@hesbynett.no> - 2019-08-29 10:24 +0200
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-29 10:05 -0400
Re: Weird use of maps. Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2019-08-28 19:19 +0100
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 21:05 -0400
Re: Weird use of maps. usenet@stegropa.de (Stefan Große Pawig) - 2019-08-28 20:22 +0200
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 21:08 -0400
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 21:16 -0400
Re: Weird use of maps. usenet@stegropa.de (Stefan Große Pawig) - 2019-08-29 20:14 +0200
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-29 20:14 -0400
Re: Weird use of maps. David Brown <david.brown@hesbynett.no> - 2019-08-30 08:28 +0200
Re: Weird use of maps. Öö Tiib <ootiib@hot.ee> - 2019-08-30 00:15 -0700
Re: Weird use of maps. Manfred <noname@add.invalid> - 2019-09-13 17:49 +0200
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-09-13 15:04 -0400
Re: Weird use of maps. Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-28 19:33 +0000
Re: Weird use of maps. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-28 21:11 -0400
csiph-web