Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-20 Thread Jürgen Spitzmüller
Stefan Schimanski wrote: > Sorry, got a ok from Richard privately and Andre originally proposed   > exactly the same code just with a std::vector. Counted that as ok. OK then. Jürgen

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-20 Thread Stefan Schimanski
Sorry, got a ok from Richard privately and Andre originally proposed exactly the same code just with a std::vector. Counted that as ok. Stefan Stefan Schimanski wrote: Will commit if nobody complains. The current policy is not "commit if nobody complains", but "commit if you got two OK'

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-20 Thread Jürgen Spitzmüller
Stefan Schimanski wrote: > Will commit if nobody complains. The current policy is not "commit if nobody complains", but "commit if you got two OK's or the OK from José". Please stick to that. Jürgen

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Richard Heck
Looks sensible to me. Stefan Schimanski wrote: > STL's vector doesn't give access to the data required by Qt, but > QVector does. So this slight variation of your proposed patch: > >// double the size if needed >static QVector points(32); >if (np > points.size()) >

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Stefan Schimanski
STL's vector doesn't give access to the data required by Qt, but QVector does. So this slight variation of your proposed patch: // double the size if needed static QVector points(32); if (np > points.size()) points.resize(2 * np); Will commit if nobody compl

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Andre Poenitz
On Sat, May 19, 2007 at 06:51:17PM +0200, Stefan Schimanski wrote: > Here is the patch. Comments? > > Wonder if there is something like that in Boost, but didn't find it. > > Stefan Index: src/frontends/qt4/QLPainter.cpp === --- sr

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Stefan Schimanski
Here is the patch. Comments? Wonder if there is something like that in Boost, but didn't find it. Stefan semistaticpoints.patch Description: Binary data Am 19.05.2007 um 16:10 schrieb Stefan Schimanski: Am 19.05.2007 um 14:48 schrieb Andre Poenitz: On Sat, May 19, 2007 at 10:52:48AM -0

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Stefan Schimanski
Am 19.05.2007 um 14:48 schrieb Andre Poenitz: On Sat, May 19, 2007 at 10:52:48AM -, [EMAIL PROTECTED] wrote: + // Must use new as np is not known at compile time. + boost::scoped_array points(new QPoint[np]); There are never more than five of them, are there? So you could as

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Stefan Schimanski
Am 19.05.2007 um 14:48 schrieb Andre Poenitz: On Sat, May 19, 2007 at 10:52:48AM -, [EMAIL PROTECTED] wrote: + // Must use new as np is not known at compile time. + boost::scoped_array points(new QPoint[np]); There are never more than five of them, are there? So you could as

Re: [Cvslog] r18419 - in /lyx-devel/trunk/src: frontends/qt4/QLPainter...

2007-05-19 Thread Andre Poenitz
On Sat, May 19, 2007 at 10:52:48AM -, [EMAIL PROTECTED] wrote: > + // Must use new as np is not known at compile time. > + boost::scoped_array points(new QPoint[np]); There are never more than five of them, are there? So you could as well use a static array and assert on np. Andre'