Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-14 Thread Jean-Marc Lasgouttes
Le 13/01/2015 22:49, Georg Baum a écrit : Jean-Marc Lasgouttes wrote: Le 11/01/2015 11:53, Georg Baum a écrit : Because they are on by default in MSVC and off by default in gcc. You can get similar ones with gcc by calling it with -Wconversion (but that outputs many more). gcc 4.9 has -Wfloa

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > Le 11/01/2015 11:53, Georg Baum a écrit : >> Because they are on by default in MSVC and off by default in gcc. You can >> get similar ones with gcc by calling it with -Wconversion (but that >> outputs many more). > > gcc 4.9 has -Wfloat-conversion. I tried it, but it

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Jean-Marc Lasgouttes
Le 13/01/2015 13:52, Vincent van Ravesteijn a écrit : I googled it for you: ;) "Note: This class template is deprecated as of C++11. unique_ptr is a new facility with a similar functionality, but with improved security (no fake copy assignments), added features (deleters) and support for arrays.

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Vincent van Ravesteijn
> > Another thing if we use C++11 mode is that auto_ptr is deprecated. Who knows > what to do about that? > I googled it for you: ;) "Note: This class template is deprecated as of C++11. unique_ptr is a new facility with a similar functionality, but with improved security (no fake copy assignment

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Jean-Marc Lasgouttes
Le 13/01/2015 11:41, Vincent van Ravesteijn a écrit : gcc 4.9 has -Wfloat-conversion. I tried it, but it really gives many warnings (see below) and I am uncomfortable with using it. I wonder though why MSVC only gives a few of them. Did you only attached a part of the output ? There are not so

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Vincent van Ravesteijn
On Tue, Jan 13, 2015 at 11:27 AM, Jean-Marc Lasgouttes wrote: > Le 11/01/2015 11:53, Georg Baum a écrit : >> >> Because they are on by default in MSVC and off by default in gcc. You can >> get similar ones with gcc by calling it with -Wconversion (but that >> outputs >> many more). > > > gcc 4.9 h

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Jean-Marc Lasgouttes
Le 11/01/2015 11:53, Georg Baum a écrit : Because they are on by default in MSVC and off by default in gcc. You can get similar ones with gcc by calling it with -Wconversion (but that outputs many more). gcc 4.9 has -Wfloat-conversion. I tried it, but it really gives many warnings (see below)

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Jean-Marc Lasgouttes
Le 13/01/2015 10:31, Vincent van Ravesteijn a écrit : I guess that when you use AntiAliasing, you would be able to actually draw non-integer widths. Don't know how Qt handles it though. The documentation does not mention it. JMarc

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Vincent van Ravesteijn
On Tue, Jan 13, 2015 at 10:14 AM, Jean-Marc Lasgouttes wrote: > Le 13/01/2015 01:22, Uwe Stöhr a écrit : >> >> My change allowed to set the line width to any value you like. As i had >> to set a default width I chose 0.5 because this is already a LaTeX >> default width (if I remember correctly). >

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-13 Thread Jean-Marc Lasgouttes
Le 13/01/2015 01:22, Uwe Stöhr a écrit : My change allowed to set the line width to any value you like. As i had to set a default width I chose 0.5 because this is already a LaTeX default width (if I remember correctly). Anyway, the thickness must be a float to allow full control of the line widt

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-12 Thread Uwe Stöhr
Am 11.01.2015 um 20:03 schrieb Jean-Marc Lasgouttes: OK, this boils down to the change introduced by Uwe at f01e36b6. Uwe, can you tell us why non integer values are needed? In particular, I do not know where the 0.5 for line_thin comes from. My change allowed to set the line width to any valu

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-11 Thread Jean-Marc Lasgouttes
Le 11/01/2015 19:56, Jean-Marc Lasgouttes a écrit : Le 11/01/2015 03:14, Richard Heck a écrit : JMarc, does dotted_line_thickness_ need to be a float? Actually, it is a float because we use QPen::setWidthF to set the width as a real. Stephan, do you know whether we really that? We do not do tr

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-11 Thread Jean-Marc Lasgouttes
Le 11/01/2015 03:14, Richard Heck a écrit : JMarc, does dotted_line_thickness_ need to be a float? Actually, it is a float because we use QPen::setWidthF to set the width as a real. Stephan, do you know whether we really that? We do not do transforms on painters, do we? JMarc

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-11 Thread Jean-Marc Lasgouttes
Le 11/01/2015 02:20, Uwe Stöhr a écrit : Hello JMarc, after your merge I get these 2 compilation warnings: ..\..\src\RowPainter.cpp(448): warning C4244: 'Argument': conversion of 'float' to 'int', possible dataloss ..\..\src\RowPainter.cpp(450): warning C4244: 'Initialisation': conversion

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-11 Thread Jean-Marc Lasgouttes
Le 11/01/2015 03:14, Richard Heck a écrit : JMarc, does dotted_line_thickness_ need to be a float? I do not think so, but then I do not know this code well. There are some additional tricks linked to zoom that cause the value to not exactly be what we think it is. Actually, QFontMetrics alr

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-11 Thread Jean-Marc Lasgouttes
Le 11/01/2015 11:53, Georg Baum a écrit : Because they are on by default in MSVC and off by default in gcc. You can get similar ones with gcc by calling it with -Wconversion (but that outputs many more). Yes, I tried it, but it is not useful. I have had cases where those warnings showed a rea

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-11 Thread Georg Baum
Richard Heck wrote: > On 01/10/2015 08:20 PM, Uwe Stöhr wrote: >> Hello JMarc, >> >> after your merge I get these 2 compilation warnings: >> >> ..\..\src\RowPainter.cpp(448): warning C4244: 'Argument': conversion >> of 'float' to 'int', possible dataloss >> ..\..\src\RowPainter.cpp(450): warni

Re: 2 dataloss warnings after merge of remote-tracking branch

2015-01-10 Thread Richard Heck
On 01/10/2015 08:20 PM, Uwe Stöhr wrote: Hello JMarc, after your merge I get these 2 compilation warnings: ..\..\src\RowPainter.cpp(448): warning C4244: 'Argument': conversion of 'float' to 'int', possible dataloss ..\..\src\RowPainter.cpp(450): warning C4244: 'Initialisation': conversion

2 dataloss warnings after merge of remote-tracking branch

2015-01-10 Thread Uwe Stöhr
Hello JMarc, after your merge I get these 2 compilation warnings: ..\..\src\RowPainter.cpp(448): warning C4244: 'Argument': conversion of 'float' to 'int', possible dataloss ..\..\src\RowPainter.cpp(450): warning C4244: 'Initialisation': conversion of 'float' to 'const int' (I am wonderi