Re: [PATCH] bug 2975

2006-11-09 Thread Georg Baum
Am Donnerstag, 9. November 2006 13:43 schrieb Ozgur Ugras BARAN: > On 11/9/06, Georg Baum <[EMAIL PROTECTED]> wrote: > > Ozgur Ugras BARAN wrote: > > > > > This patch solves the crash while calling Qt4-TOC dialog in Linux /gcc-4.1 > > > > Are you sure? > > I have tested here and it works now.. >

Re: [PATCH] bug 2975

2006-11-09 Thread Ozgur Ugras BARAN
No problem Ugras. Post your patch to the list and we'll manage. Not sure this is a thing to say but have a nice journey ;-) Abdel. Thanks.. I will send postcards :-) Ugras

Re: [PATCH] bug 2975

2006-11-09 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: On 11/9/06, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Shall we black-list gcc-4.0.2 and 4.1 or put in your patch? I'll put in your patch ;-) Put in my patch :)... Using insert(pair) does not hurt for any compile/run environment, and solves many of them. So why not

Re: [PATCH] bug 2975

2006-11-09 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: On 11/9/06, Abdelrazak Younes <[EMAIL PROTECTED]> > Anyway, I am not that sure. This may be a gcc bug also. Or maybe a Qt4.2 bug. QModelIndex is a strange beast. Abdel. No, this is strictly stl problem. try the same map with an int instead of QModelIndex. you will g

Re: [PATCH] bug 2975

2006-11-09 Thread Ozgur Ugras BARAN
On 11/9/06, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Ozgur Ugras BARAN wrote: > On 11/9/06, Georg Baum > What I understand is map::operator[] returns mapped_type&, (for this > case a const_iterator&). When you use operator = you try to > copy-construct with another const_iterator. This is e

Re: [PATCH] bug 2975

2006-11-09 Thread Abdelrazak Younes
Ozgur Ugras BARAN wrote: On 11/9/06, Georg Baum What I understand is map::operator[] returns mapped_type&, (for this case a const_iterator&). When you use operator = you try to copy-construct with another const_iterator. This is erroneous, since you cannot dereference the first. Pair, howeve

Re: [PATCH] bug 2975

2006-11-09 Thread Ozgur Ugras BARAN
On 11/9/06, Georg Baum <[EMAIL PROTECTED]> wrote: Ozgur Ugras BARAN wrote: > This patch solves the crash while calling Qt4-TOC dialog in Linux /gcc-4.1 Are you sure? I have tested here and it works now.. The old code is perfectly valid for a std::map: if the element does not exist it is cre

Re: [PATCH] bug 2975

2006-11-09 Thread Abdelrazak Younes
Georg Baum wrote: Ozgur Ugras BARAN wrote: This patch solves the crash while calling Qt4-TOC dialog in Linux /gcc-4.1 Are you sure? The old code is perfectly valid for a std::map: if the element does not exist it is created. I don't understand at all how using insert() instead of operator[]

Re: [PATCH] bug 2975

2006-11-09 Thread Georg Baum
Ozgur Ugras BARAN wrote: > This patch solves the crash while calling Qt4-TOC dialog in Linux /gcc-4.1 Are you sure? The old code is perfectly valid for a std::map: if the element does not exist it is created. I don't understand at all how using insert() instead of operator[] could solve a crash.

[PATCH] bug 2975

2006-11-09 Thread Ozgur Ugras BARAN
This patch solves the crash while calling Qt4-TOC dialog in Linux /gcc-4.1 Can somebody commit it? Index: frontends/qt4/TocModel.C === --- frontends/qt4/TocModel.C (revision 15811) +++ frontends/qt4/TocModel.C (working copy) @@ -96,7