One should think this is a clear warning sign. :-) But the code worked. So problem solved. Now I am wondering if I was over-cautious, or if there are less obvious problems. With different compilers? Platforms? Some less known QMap/QList features, which might shuffle the objects around? Not that the obvious stuff isn't enough NOT to do this.
On Mon, 20 Jul 2015 18:41:16 +0200 Gunnar Roth <gunnar.r...@gmx.de> wrote: > Hi, > well i think thats even worse. You have to call the base class copy > constructor in any derived copy constructor but you cannot as it is private ( > and even not implemented), > so that was not enough warning for them not to do this? > > > > Am 20.07.2015 um 18:38 schrieb Guido Seifert <warg...@gmx.de>: > > > > No, they gave a class, which inherits QObject a copy/assignment > > constructor. Not as bad as patching Qt, but still not a good idea. > > > > On Mon, 20 Jul 2015 18:35:08 +0200 > > Gunnar Roth <gunnar.r...@gmx.de> wrote: > > > >> Hi Guido, > >> you mean they have patched qt and gave Object an assignment operator and > >> copy constructor? > >> Really? > >> > >> Regards, > >> Gunnar > >> > >> > >>> Am 20.07.2015 um 14:51 schrieb Guido Seifert <warg...@gmx.de>: > >>> > >>> 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 their containers. But it > >>> smells. So what is the worst what can be expected? Something not obvious? > >>> On different compilers? I need some convincing reasons, which cannot just > >>> waved away..... or confirmation that eveything is fine and I can stop > >>> worrying.... but this also must be convincing. Perhaps even more ;-) > >>> -- > >>> Sent from my Android phone with K-9 Mail. Please excuse my brevity. > >>> _______________________________________________ > >>> Interest mailing list > >>> Interest@qt-project.org > >>> http://lists.qt-project.org/mailman/listinfo/interest > >> > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest