[Development] Applications using -fno-rtti

Alberto Mardegan mardy at users.sourceforge.net
Sat Jun 20 20:31:25 CEST 2020


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:


https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.15&id=97645478de3ceffce11f58eab140c4c775e48be5

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?

Anyway, were I to submit a patch replacing typeid() with something which
does not require RTTI ("q->metaObject() == QProcess::staticMetaObject()"
would work, I guess? Or maybe even comparing q->className()?), would
that be accepted?

Ciao,
  Alberto

-- 
http://www.mardy.it - Geek in un lingua international


More information about the Development mailing list