Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Giuseppe D'Angelo via Development
Il 21/06/20 13:22, Lars Knoll ha scritto: We are making use of dynamic_cast and typeid in Qt nowadays, so I guess it’s high time we adjust the wiki. In the light of this: has anyone thought of deprecating in Qt 6 the ad-hoc casting functions like qgraphicsitem_cast, qstyleoption_cast and so

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Thiago Macieira
On Sunday, 21 June 2020 06:44:23 PDT André Pönitz wrote: > I would appreciate if someone on Windows could run a reality check on that > with a dynamic_cast between classes that don't have a key function, i.e. > where everything is inlined and/or templates. They must have a key virtual function. Bu

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread André Pönitz
On Sun, Jun 21, 2020 at 11:22:58AM +, Lars Knoll wrote: > We didn’t want it in earlier versions of Qt for mainly two reasons. Early > implementations had quite an overhead on library size, and dynamic_cast didn’t > work reliable between DLL boundaries on Windows. Both problems have gone away >

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Thiago Macieira
On Sunday, 21 June 2020 05:35:20 PDT Konstantin Ritt wrote: > I, for example, didn't know the issue with dynamic_cast across dll > boundaries is not an issue anymore. It's never been. What changed is our understanding of how to make it work across DLL boundaries. The answer is: ALL classes with

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Thiago Macieira
On Sunday, 21 June 2020 08:22:14 PDT Alberto Mardegan wrote: > On 20/06/20 23:45, Thiago Macieira wrote: > > No, because it won't catch this: > > > > class MyProcess : QProcess > > { > > protected: > > virtual void setupChildProcess(); > > }; > > > > Note the lack of Q_OBJECT. > > But what i

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Alberto Mardegan
On 20/06/20 23:45, Thiago Macieira wrote: > No, because it won't catch this: > > class MyProcess : QProcess > { > protected: > virtual void setupChildProcess(); > }; > > Note the lack of Q_OBJECT. But what is the harm if we don't catch that? It's still better than a crash, isn't it? Also, t

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Elvis Stansvik
Den sön 21 juni 2020 kl 14:37 skrev Konstantin Ritt : > > > I think we then had discussions when moving from Qt 4 to Qt 5, that we will > > start requiring RTTI. > > However this was never promoted, and now you're saying people who ported > their projects with no-rtti to Qt5 had to enable rtti ye

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Konstantin Ritt
> I think we then had discussions when moving from Qt 4 to Qt 5, that we will start requiring RTTI. However this was never promoted, and now you're saying people who ported their projects with no-rtti to Qt5 had to enable rtti years ago or expect crashes?) Thanks to Alberto for pointing this issu

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Lars Knoll
> On 21 Jun 2020, at 13:10, Giuseppe D'Angelo via Development > wrote: > > Il 20/06/20 22:45, Thiago Macieira ha scritto: >> On Saturday, 20 June 2020 11:31:25 PDT Alberto Mardegan wrote: >>> I think I missed an announcement about Qt applications having to use >>> RTTI; on the opposite, I thou

Re: [Development] Applications using -fno-rtti

2020-06-21 Thread Giuseppe D'Angelo via Development
Il 20/06/20 22:45, Thiago Macieira ha scritto: On Saturday, 20 June 2020 11:31:25 PDT Alberto Mardegan wrote: I think I missed an announcement about Qt applications having to use RTTI; on the opposite, I thought that the whole point of QMetaObject was not to require RTTI support; has this change