[Development] Enable Exceptions for Windows CE as default

Olivier Goffart olivier at woboq.com
Wed May 9 12:33:29 CEST 2012

On Wednesday 09 May 2012 11:28:30 Giuseppe D'Angelo wrote:
> On 9 May 2012 10:22, Olivier Goffart <olivier at woboq.com> wrote:
> > On Wednesday 09 May 2012 09:45:31 Andreas Holzammer wrote:
> >> Hi,
> >> 
> >> I was hitting qtxmlpatterns not compiling, because Exceptions are not
> >> enabled by default for Windows CE. My guess is that this was done for
> >> performance and or security reasons.
> >> 
> >> I would like to propose that we enable the Exceptions for Windows CE for
> >> Qt5 as default. If you have concerns, comments or issues with that,
> >> please answer to this mail and explain it.
> > 
> > You can enable exceptions only in xmlpattern.  They are not suppose to
> > "traverse" other layers of Qt.
> > 
> > In particular, Qt does not play well with exceptions.  They won't pass
> > trough the event loop, and most of the Qt code is not exceptions safe
> > (code often do not expect a signal to throw)
> > 
> > So it is probably better to leave them disabled, as exceptions still add
> > lot of code to the binary, and that won't be of any use
> I think the point here is that
> 1) xmlpatterns doesn't build under any platform if exceptions are
> disabled (it won't "expose" exceptions in its API / propagate them,
> but it uses them internally);
> 2) WinCE *always* get exceptions disabled.
> While 1) is of course a design decision (so far, so good) what's the
> reason for 2)? Prevent a massive code expansion? Broken MS compilers?

Yes. My point is that one can add in the xmlpatterns.pro the proper flags to 
build with exception.  But leave the exceptions disabled for the rest of Qt 
which does not need it.

Maybe the compilers used to be broken (I don't know). But i hope that by now 
compilers have been fixed.
I suppose the reason was mainly performence.

More information about the Development mailing list