[Development] Ability to turn exceptions on and off being removed (was: Enable Exceptions for Windows CE as default)

Thiago Macieira thiago.macieira at intel.com
Wed May 16 00:07:16 CEST 2012


On quinta-feira, 10 de maio de 2012 08.53.17, lars.knoll at nokia.com wrote:
> On 5/10/12 10:47 AM, "ext Joerg Bornemann" <joerg.bornemann at nokia.com>
> 
> wrote:
> >On 09/05/2012 09:45, ext Andreas Holzammer wrote:
> >> 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.
> >
> >We've disabled exceptions for the Windows CE port to reduce the size of
> >the binaries / memory usage for Qt's DLLs.
> >That's the only reason. No buggy compilers or alike. You can safely turn
> >on exceptions in xmlpatterns.
> 
> See https://codereview.qt-project.org/#change,25787
> We currently need the same thing for QtQml, pending change in
> https://codereview.qt-project.org/#change,25814
> 

Just so everyone is on the same page: the changes going in to qtbase mean that 
the -no-exceptions option is effectively removed. The Qt configuration will no 
longer allow users to turn it on or off.

The decision to enable exceptions or disable them will now rest exclusively on 
the Qt source code itself. QtCore, QtConcurrent and the modules that need 
exceptions (like QtXmlPatterns) have it turned on. All others have it turned 
off, helping save library size.

We hope that this will not cause any problems. Exceptions travelling through 
Qt code have never been supported outside of a few specific codepaths, so we 
don't expect this to cause any regressions.

Does anyone foresee any?


In time: this change does not affect user programs, examples, demos as well as 
unit tests. Exception support is still enabled there by default and can be 
disabled with CONFIG += exceptions-off.

It's also possible to turn exceptions off everywhere by tweaking the mkspec, 
which is also how you turn RTTI off completely. But at this point we'll 
probably say it's an unsupported configuration and disavow responsibility for 
any build errors.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120516/22cc94e8/attachment.sig>


More information about the Development mailing list