[Development] Applications using -fno-rtti
ritt.ks at gmail.com
Sun Jun 21 14:35:20 CEST 2020
> 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
Thanks to Alberto for pointing this issue now, when the majority didn't
switch to the new LTS yet.
I, for example, didn't know the issue with dynamic_cast across dll
boundaries is not an issue anymore.
Plz make sure the documentation is up to date and `CONFIG += rtti_off` does
nothing as of 5.15.
вс, 21 июн. 2020 г. в 14:23, Lars Knoll <lars.knoll at qt.io>:
> > On 21 Jun 2020, at 13:10, Giuseppe D'Angelo via Development <
> development at qt-project.org> 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 thought that the whole point of QMetaObject
> >>> not to require RTTI support; has this changed?
> >> As you can see from the commit, no provision was made for no-RTTI
> builds. I
> >> don't think they've ben allowed since 5.0.
> > The Qt coding policy document still says that no RTTI facilities are
> allowed within Qt:
> >> https://wiki.qt.io/Coding_Conventions
> > (Unchanged since 2015; before, I'm sure that document was somewhere
> else, with the same contents regarding this matter.)
> > Where/when was such a change of policy decided?
> 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 many years ago.
> I have to go by what I remember now, but I think we then had discussions
> when moving from Qt 4 to Qt 5, that we will start requiring RTTI. The
> reasons where that dynamic_cast<> and typeid require it and it has very
> little overhead on library size (as opposed to exceptions which are still
> optional). By that time (or maybe even earlier), we also started compiling
> Qt with RTTI enabled on all platforms.
> But it looks like nobody ever adjusted the wiki page :/
> We are making use of dynamic_cast and typeid in Qt nowadays, so I guess
> it’s high time we adjust the wiki.
> Development mailing list
> Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development