README.qtcopy: -no-stl or no -no-stl?
bo at sonofthor.dk
Wed Jan 21 14:14:09 GMT 2004
On Wednesday 21 January 2004 10:24, Lubos Lunak wrote:
> On Tuesday 20 of January 2004 20:34, Bo Thorsen wrote:
> > On Tuesday 20 January 2004 14:51, Dirk Mueller wrote:
> > > On Tuesday 20 January 2004 10:30, Bo Thorsen wrote:
> > > > cripple peoples Qt, when they might download Qt apps that need
> > > > exceptions. And yes, there are examples of such apps.
> > >
> > > Might be a stupid question, but why do you expect that Qt would do
> > > anything with exceptions?
> > >
> > > it is still fine to compile Qt without exceptions support. If you
> > > want exceptions fine - use them. But don't expect that Qt makes use
> > > of them.
> > >
> > > what do you think what will happen when exceptions cross
> > > signal/slot borders, even when Qt is compiled with exception
> > > support? Qt does not handle any exceptions at all, so letting them
> > > pass through Qt is probably producing very unwanted things.
> > >
> > > And if you don't pass the exceptions through Qt - you can compile
> > > Qt without exceptions support. Thats why we recommend it.
> > Just throw an exception in a slot, or something that is called from a
> > slot. Qt without exception support crashes. Qt with exception support
> > handles this nicely.
> > Or throw an exception in any of the template methods Qt has for
> > overriding, with the same results.
> > Or subclass a Qt class, and override something that's called by a
> > non-overridden method...
> > There are so many ways to crash Qt if you use exceptions but have a
> > Qt without it. And they are all fixed by not using that old
> > workaround.
> I think what Dirk was trying to say was that just removing
> -fno-exceptions is not going to magically make Qt exceptions aware. Qt
> code won't generally expect an exception to be thrown, and may leak
> resources or misbehave. Just e.g. have a look at
> QObject::activate_signal() and start counting things that may go wrong.
> Before fixing at least the parts where exceptions are most likely
> there's no point in compiling Qt with exceptions enabled.
That Qt might not be prepared for exceptions is one thing, but all the
problems there can be worked around. Saying there's no point just because
it's not as useful as it could be is downright wrong.
I have not heard a single reasonable argument for keeping this switch yet.
And still people won't do it.
Oh well, I'll bring it up in another year or two. Perhaps this odd
resentment against exceptions will be somewhat faded then :-(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
More information about the kde-core-devel