Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread André Somers
Op 23-7-2015 om 08:42 schreef Thiago Macieira: > Q_GADGET has existed since 4.0. Sure, but it was undocumented API. André ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Thursday 23 July 2015 08:06:29 Bo Thorsen wrote: > I know, but Thiago said he hadn't seen it actually do any warnings. And > I agree with him that I haven't seen it warn about integer types. More to the point: I *have* seen warnings about integer conversions to smaller integers despite this p

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Thursday 23 July 2015 08:00:20 Sze Howe Koh wrote: > On 23 July 2015 at 01:03, Guido Seifert wrote: > >>> - the QObject's connections? Will all copies emit the same signals, will > >>> all copies have their slots called?> > > Worked somehow... probably through magic. > > > > This was my probl

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Bo Thorsen
Den 23-07-2015 kl. 07:57 skrev Gunnar Roth: > >> Am 23.07.2015 um 07:51 schrieb Bo Thorsen > >: >> >> Den 23-07-2015 kl. 00:07 skrev Thiago Macieira: Disabling C4244 /* conversion from 'type1' to 'type2', possible loss of data > */ is more than going to far.

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Gunnar Roth
> Am 23.07.2015 um 07:51 schrieb Bo Thorsen : > > Den 23-07-2015 kl. 00:07 skrev Thiago Macieira: >>> Disabling C4244 /* conversion from 'type1' to 'type2', possible loss of data */ is more than going to far. It is kind of sabotage imho. >> Note that this does not apply to 64-bit to 32-bit c

Re: [Interest] Qtcontainerbench std::vector vs QVector

2015-07-22 Thread Gunnar Roth
> Am 23.07.2015 um 07:00 schrieb Constantin Makshin : > > "vector" branch is identical to "master“. Not anymore ;-) Thanks for the information. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Bo Thorsen
Den 23-07-2015 kl. 00:07 skrev Thiago Macieira: >> Disabling C4244 /* conversion from 'type1' to 'type2', possible loss of data >> >*/ is more than going to far. It is kind of sabotage imho. > Note that this does not apply to 64-bit to 32-bit conversions. Those are still > active, so C4244 does not

[Interest] QMainWindow state resetting

2015-07-22 Thread Berkay Elbir
Hi, I'm searching is there a way to reset to default state of QMainWindow at runtime? I have a QMainWindow that has some widgets, user can customize their locations and save them. But I want to put a button that resets window states and reverts back to default mode at runtime like "reset window la

Re: [Interest] Qtcontainerbench std::vector vs QVector

2015-07-22 Thread Constantin Makshin
"vector" branch is identical to "master". On 07/22/2015 10:20 PM, Gunnar Roth wrote: > Hi, > for whom it may concern i post my results for vector iterating using > iterator and index plus insert via push_back. > > the test code is at https://github.com/gunrot/qtcontainerbench in > branch vector.

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Sze Howe Koh
On 23 July 2015 at 01:03, Guido Seifert wrote: >>> - the QObject's connections? Will all copies emit the same signals, will >>> all copies have their slots called? > > Worked somehow... probably through magic. > > This was my problem. It really looked like we could get away with it. The > whole

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 22:11:10 Scott Aron Bloom wrote: > IYO, Would it be possible to make the restoration a QT option? > > Ie #define QT_RESTORE_PRAGMA_STATE #define QT_CC_WARNINGS That's already there. Qt will not disable any warning. You've been warned. -- Thiago Macieira - thiago.maciei

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 23:00:38 Gunnar Roth wrote: > > This is evil! > > > > > > Pardon me? Limitation of English. In Portuguese, there are two words for "this". In proper text, the 1st person "this" (isto, este, esta) refers to something close to the speaker or something which you haven't

Re: [Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 23:20:40 René J. V. Bertin wrote: > Thiago Macieira wrote: > > $ git name-rev --tags 1bd27f24fb7f7d82f4b67cffe43e0af644709106 > > 1bd27f24fb7f7d82f4b67cffe43e0af644709106 tags/v5.4.0-alpha1~525 > > > > It should work on 5.4 then. The fix for static libraries came with 5.4

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Scott Aron Bloom
-Original Message- From: interest-bounces+scott=towel42@qt-project.org [mailto:interest-bounces+scott=towel42@qt-project.org] On Behalf Of Thiago Macieira Sent: Wednesday, July 22, 2015 3:09 PM To: interest@qt-project.org Subject: Re: [Interest] Need argumentative help. givi

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 17:14:43 Matthew Woehlke wrote: > At least all three of the above are probably better restored to the > user's state after Qt code. Again: we did it for a while then people complained that their code "regressed". So we turned them back off. -- Thiago Macieira - thiago.

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 23:11:59 Gunnar Roth wrote: > Hello Thiago. > > > Of those, C4275, C4514, C4800, C4097, C4786 and C4710 are stupid. I can't > > see anyone who wants to know those warnings. > > Most are sure, but sometimes you need this diagnostic and you wonder why you > cannot switch i

Re: [Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

2015-07-22 Thread René J . V . Bertin
Thiago Macieira wrote: > $ git name-rev --tags 1bd27f24fb7f7d82f4b67cffe43e0af644709106 > 1bd27f24fb7f7d82f4b67cffe43e0af644709106 tags/v5.4.0-alpha1~525 > > It should work on 5.4 then. The fix for static libraries came with 5.4.1, > though. Ha, indeed, it's a little bit more complicated when do

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Matthew Woehlke
On 2015-07-22 16:52, Thiago Macieira wrote: > please take a look at the list of MSVC warnings we turn off completely: > > http://code.woboq.org/qt5/qtbase/src/corelib/global/qglobal.h.html#897 > > Of those, C4275, C4514, C4800, C4097, C4786 and C4710 are stupid. I can't see > anyone who wants to

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Gunnar Roth
Hello Thiago. > > Of those, C4275, C4514, C4800, C4097, C4786 and C4710 are stupid. I can't see > anyone who wants to know those warnings. > Most are sure, but sometimes you need this diagnostic and you wonder why you cannot switch it on. > I'll concede we may have gone too far on C4244 and C

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Gunnar Roth
Hello Thiago. > Am 22.07.2015 um 22:45 schrieb Thiago Macieira : > > On Wednesday 22 July 2015 20:51:21 Gunnar Roth wrote: >> You are completely right, albeit there is a macro you can define so qt does >> not switch of the warnings, but then you get warnings, bad if you compile >> with warnings a

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 19:20:57 Scott Aron Bloom wrote: > For my company, when I first joined, the Idea of compiled with -Werror (or > the equiv on VC++) was so far down the road, that I thought it would never > be possible. We had close to 5000 warnings between windows and linux. > > We had b

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 20:51:21 Gunnar Roth wrote: > You are completely right, albeit there is a macro you can define so qt does > not switch of the warnings, but then you get warnings, bad if you compile > with warnings as errors. Our solution ist to have a Qt_prolog.h and > Qt_epilog.h which w

Re: [Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 21:57:57 René J. V. Bertin wrote: > > qtbase: > > ./configure [...] > > qmake -config ltcg > > When was that syntax introduced? I'm getting an error trying it even with > qmake 5.4.2 . $ git name-rev --tags 1bd27f24fb7f7d82f4b67cffe43e0af644709106 1bd27f24fb7f7d82f4b67c

Re: [Interest] QCamera flash modes

2015-07-22 Thread Jason H
This is not working. So In QML, I start the backface camera, and it grabs viewfinder frames. I then call my C++ object which has this function: bool FlashControl::isFlashSupported(){ camera = new QCamera(QCamera::BackFace); if (camera) { QCameraExposure *exp = cam

Re: [Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

2015-07-22 Thread René J . V . Bertin
Thiago Macieira wrote: > No need to look further. Neither QtScript nor QtWebKit will link with LTO. > Turn it off for those two. Ahhh ... > Also, for QtGui (in both Qt 4 and 5), you need to be careful with the code for > SSE2 and SSSE3. Until I applied certain fixes to Qt 5, those would cause t

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Gunnar Roth
> > For my company, when I first joined, the Idea of compiled with -Werror (or > the equiv on VC++) was so far down the road, that I thought it would never be > possible. We had close to 5000 warnings between windows and linux. Lucky man, i once worked in a project where we had 7 warnings

[Interest] std::vector vs Qvector part 2

2015-07-22 Thread Gunnar Roth
Hi, i forget to mention that the container data, was a struct containing a String and an int32_t, which has a sizeof == 16. Now i Made a test with a strut with 2 int32_t, with a sizeof == 8. the result are for both container a lot faster even for iterating , is it because of the smaller size?

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Scott Aron Bloom
From: Gunnar Roth [mailto:gunnar.r...@gmx.de] Sent: Wednesday, July 22, 2015 11:51 AM To: Scott Aron Bloom Cc: interest@qt-project.org Subject: Re: [Interest] Need argumentative help. giving qobject copy/assignment constructor and put it in qlist/qmap Hi Scott. While I 100% agree, one thin

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Scott Aron Bloom
On Wednesday 22 July 2015 18:42:55 Scott Aron Bloom wrote: > While I 100% agree, one thing I really cant stand, is when 3rd party > vendors, DISABLE WARNINGS in their code, and don't re-enable them when > their code exits (Im looking at you Qt). I thought we stopped doing that. Of course, when

[Interest] Qtcontainerbench std::vector vs QVector

2015-07-22 Thread Gunnar Roth
Hi, for whom it may concern i post my results for vector iterating using iterator and index plus insert via push_back. the test code is at https://github.com/gunrot/qtcontainerbench in branch vector. it runs over N containers where N=min(1,10/co

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 18:42:55 Scott Aron Bloom wrote: > While I 100% agree, one thing I really cant stand, is when 3rd party > vendors, DISABLE WARNINGS in their code, and don't re-enable them when > their code exits (Im looking at you Qt). I thought we stopped doing that. Of course, when we

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 14:39:40 Matthew Woehlke wrote: > (On that subject, -Werror=cast-qual also might have helped here; that's > another one I use and would encourage. Also -Werror=return-type, which > *EVERYONE* should use, period.) I've fixed most -Wcast-qual errors in Qt the last 6 months.

Re: [Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

2015-07-22 Thread Thiago Macieira
On Wednesday 22 July 2015 19:50:27 René J.V. Bertin wrote: > Hi, > > I'm experimenting with gcc-5.1 and link-time optimisation on Linux. I > configure with > > CC = gcc-5 > CXX = g++-5 > CFLAGS += -O3 -ftracer -ftree-vectorize -flto -fuse-linker-plugin > CXXFLAGS += -O3 -ftracer -ftree-vectorize

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Gunnar Roth
Hi Scott. > > While I 100% agree, one thing I really cant stand, is when 3rd party vendors, > DISABLE WARNINGS in their code, and don't re-enable them when their code > exits (Im looking at you Qt). > > Im not a g++ guru, but in VC++ #pragma( push) and #pragma( pop ) should be a > requirement

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Scott Aron Bloom
-Original Message- From: interest-bounces+scott=towel42@qt-project.org [mailto:interest-bounces+scott=towel42@qt-project.org] On Behalf Of Matthew Woehlke Sent: Wednesday, July 22, 2015 11:40 AM To: interest@qt-project.org Subject: Re: [Interest] Need argumentative help. givin

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Matthew Woehlke
On 2015-07-21 19:39, Thiago Macieira wrote: > On Tuesday 21 July 2015 21:18:35 Jason H wrote: >> Once I was put in charge of a project where an "engineer" had replaced >> (inherited) all the Qt Q* classes used in the project to classes that did >> not have a 'Q' as a first letter. No other changes.

[Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

2015-07-22 Thread René J . V . Bertin
Hi, I'm experimenting with gcc-5.1 and link-time optimisation on Linux. I configure with CC = gcc-5 CXX = g++-5 CFLAGS += -O3 -ftracer -ftree-vectorize -flto -fuse-linker-plugin CXXFLAGS += -O3 -ftracer -ftree-vectorize -flto -fuse-linker-plugin LDFLAGS += -O3 -ftracer -ftree-vectorize -flto -fu

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Guido Seifert
> The problem with this kind of bad hack that people judge it on whether > or not they could get away with it. "It compiles? Ship it!" > > I think your problem is that your spidey sense is ringing so hard that > you lost the ability to give arguments about this :) Oh, I had plenty of argumen

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Bo Thorsen
Den 20-07-2015 kl. 14:51 skrev Guido Seifert: > Hi, just seen this in project's code. Worse, I have been told to do it > exactly this way in another code part. I must say I am less than > thrilled. On first glance this code seems to work. There is not much > copying around. The objects sit happily

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Guido Seifert
> > But remember: Contractors are nothing more than colleagues, with just > > another work model. > Yeah, but they don't get confronted with the mess they make... HEY, HEY I am contractor... And I discovered the mess and cleaned it up. Do you have an idea how often contractors are hired be

Re: [Interest] [ Android ] QtActivity connect startActivityForResult to onActivityResult to callback C++ code?

2015-07-22 Thread Edward Sutton
Thank you Ben. I think my first problem is I cannot override QtActivity:: onActivityResult As a learning attempt I should try implementing in a pure java app first. Thank you for the informative links! -Ed On Jul 22, 2015, at 12:44 AM, Ben Lau mailto:xben...@gmail.com>> wrote: For passing

[Interest] Strange binding behavior when using binding on array's element

2015-07-22 Thread geniuss
I have an|Item|with a property. This property contains an array of JavaScript objects which in turn contain other properties. When I set binding for one of object's properties to some variable and its (variable) value changes triggering the binding then all properties in the array are reset to t

Re: [Interest] QDialog class migrating down the screen

2015-07-22 Thread Michael Sué
Hi, This LINUX-bug may be related: https://bugreports.qt.io/browse/QTBUG-42939 In the bug, though, the window is moving to the upper-left on the screen. - Michael. > -Original Message- > From: interest-bounces+sue=sf.mpg...@qt-project.org [mailto:interest- > bounces+sue=sf.mpg...@qt-pro