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 in

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 arguments,

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 -flto

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.

[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 https://github.com/gunrot/qtcontainerbench in branch vector. it runs over N containers where

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 we

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

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.

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 for

[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

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

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 the

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 =

[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

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

2015-07-22 Thread Rainer Wiesenfarth
Am 21.07.2015 um 21:18 schrieb Jason H: 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. And yes, that engineer was a contractor. Let me guess: The

[Interest] Strange font issue on iOS 9

2015-07-22 Thread Juhani Matilainen
Hello I have strange font problem on iOS 9. Messy fonts are displayed in some texts. Here is an example screenshot: https://www.dropbox.com/s/vl0vszob9fupn23/file%2020.7.2015%2015.49.24.png?dl=0 This is QML based app and no problem on iOS 8 or earlier. Any ideas how to fix? I know that iOS 9

[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

Re: [Interest] Mac with Retina Display - Look is Pixilated with Qt-5.4.2

2015-07-22 Thread Hamish Moffatt
On 22/07/15 15:52, Robert Iakobashvili wrote: Gentlemen, A user pointed to the issue on Mac Book Pro 15 inch mid 2015. AMD Radeon R9 graphic card, 15.4-inch, 2880 x 1800 screen, Mac OS 10.10.4. and mentioned that the look is pixelated as the application does not support Retina.

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-

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 said yet,

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. And

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

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 seem

[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

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. it runs

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

2015-07-22 Thread Gunnar Roth
Am 23.07.2015 um 07:00 schrieb Constantin Makshin cmaks...@gmail.com: vector branch is identical to master“. Not anymore ;-) Thanks for the information. ___ Interest mailing list Interest@qt-project.org

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 b...@vikingsoft.eu: 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

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 know

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 doing

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 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 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 -

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.1,

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 been

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 it on.

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.

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 thiago.macie...@intel.com: 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

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

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.macieira

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 warg...@gmx.de 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

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 xben...@gmail.commailto:xben...@gmail.com

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