[Development] Enable Exceptions for Windows CE as default

lars.knoll at nokia.com lars.knoll at nokia.com
Wed May 9 13:30:35 CEST 2012

On 5/9/12 12:33 PM, "ext Olivier Goffart" <olivier at woboq.com> wrote:

>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
>> >> 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
>> > 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
>build with exception.  But leave the exceptions disabled for the rest of
>which does not need it.
>Maybe the compilers used to be broken (I don't know). But i hope that by
>compilers have been fixed.
>I suppose the reason was mainly performence.

Actually I wonder why we don't compile all of Qt with exceptions disabled
by default and enable them only for the places they are really needed
(QtCore for exception safe signal/slot connections etc, and QtXmlPatterns
because it uses them). Can anybody come up with a good reason not to do

The other option would be to fix the -no-exceptions configure flag to mean
no exceptions, except where they are really needed.


More information about the Development mailing list