Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Konstantin Tokarev
20.06.2020, 23:49, "Thiago Macieira" : > 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

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Thiago Macieira
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 changed? As you can see from the commit, no

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Alberto Mardegan
On 20/06/20 21:42, Konstantin Tokarev wrote: > Comparing metaObject() with staticMetaObject() is wrong because it would fail > even for QProcess. No, I tried, it seems to work as expected: == #include #include class BaseClass: public QObject { Q_OBJECT }; class

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Giuseppe D'Angelo via Development
Il 20/06/20 21:31, Alberto Mardegan ha scritto: Sorry, my wording was imprecise: we want to know if q is a*proper* subclass of QProcess (that is, a derived class). Note that inherits() / className() will not work as intended if the subclass does not use Q_OBJECT. Only typeid() will tell you

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Alberto Mardegan
On 20/06/20 22:21, Alexey Minnekhanov wrote: > > сб, 20 июн. 2020 г. в 22:01, Alberto Mardegan > mailto:ma...@users.sourceforge.net>>: > > we only want to know if we are a subclass of QProcess. > > QObject::inherits(..) ? Sorry, my wording was imprecise: we want to know if q is a *proper*

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Konstantin Tokarev
20.06.2020, 22:12, "Allan Sandfeld Jensen" : > On Samstag, 20. Juni 2020 21:00:27 CEST Alberto Mardegan wrote: >>  On 20/06/20 21:42, Konstantin Tokarev wrote: >>  > Comparing metaObject() with staticMetaObject() is wrong because it would >>  > fail even for QProcess. >> >>  I didn't try, but

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Alexey Minnekhanov
сб, 20 июн. 2020 г. в 22:01, Alberto Mardegan : > we only want to know if we are a subclass of QProcess. > QObject::inherits(..) ? ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Allan Sandfeld Jensen
On Samstag, 20. Juni 2020 21:00:27 CEST Alberto Mardegan wrote: > On 20/06/20 21:42, Konstantin Tokarev wrote: > > Comparing metaObject() with staticMetaObject() is wrong because it would > > fail even for QProcess. > > I didn't try, but why would it fail? > > > OTOH, using qobject_cast would

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Alberto Mardegan
On 20/06/20 21:42, Konstantin Tokarev wrote: > Comparing metaObject() with staticMetaObject() is wrong because it would fail > even for QProcess. I didn't try, but why would it fail? > OTOH, using qobject_cast would handle classes derived > from QProcess correctly, unlike code with typeid().

Re: [Development] Applications using -fno-rtti

2020-06-20 Thread Konstantin Tokarev
20.06.2020, 21:34, "Alberto Mardegan" : > Hi all! >   A couple of days ago a bug was filed against a project of mine, which > has been built with -fno-rtti since Qt4 times: > >   https://bugzilla.opensuse.org/show_bug.cgi?id=1172904 > > The bug, it appears, is a crash in QProcess due to the use

[Development] Applications using -fno-rtti

2020-06-20 Thread Alberto Mardegan
Hi all! A couple of days ago a bug was filed against a project of mine, which has been built with -fno-rtti since Qt4 times: https://bugzilla.opensuse.org/show_bug.cgi?id=1172904 The bug, it appears, is a crash in QProcess due to the use of typeid(), which was introduced in Qt 5.15: