Re: [Development] Disabling exception support in QtCore?

2013-10-10 Thread Olivier Goffart
On Thursday 03 October 2013 10:38:59 Thiago Macieira wrote: On quinta-feira, 3 de outubro de 2013 10:36:44, Olivier Goffart wrote: I dislike allowing this via the signal-slot mechanism because I see throwing from a slot as incompatible with the connection semantics. That would mean

Re: [Development] Disabling exception support in QtCore?

2013-10-10 Thread Olivier Goffart
On Thursday 10 October 2013 15:14:02 André Somers wrote: Op 10-10-2013 14:53, Olivier Goffart schreef: On Thursday 03 October 2013 10:38:59 Thiago Macieira wrote: On quinta-feira, 3 de outubro de 2013 10:36:44, Olivier Goffart wrote: I dislike allowing this via the signal-slot mechanism

Re: [Development] Disabling exception support in QtCore?

2013-10-10 Thread BRM
On Thursday, October 10, 2013 9:26 AM, Olivier Goffart oliv...@woboq.com wrote: On Thursday 10 October 2013 15:14:02 André Somers wrote: Op 10-10-2013 14:53, Olivier Goffart schreef: On Thursday 03 October 2013 10:38:59 Thiago Macieira wrote: On quinta-feira, 3 de outubro de 2013

Re: [Development] Disabling exception support in QtCore?

2013-10-10 Thread Olivier Goffart
On Thursday 10 October 2013 08:22:44 BRM wrote: I have personnally maintained a 400k+ SLOC codebase based on QT. It made extensive use of Signals/Slots between objects. Even though I was pretty much the only developer working on it, I still had to quite often track through signals/slots to

Re: [Development] Disabling exception support in QtCore?

2013-10-10 Thread Knoll Lars
On 10/10/13 6:02 PM, Olivier Goffart oliv...@woboq.com wrote: On Thursday 10 October 2013 08:22:44 BRM wrote: I have personnally maintained a 400k+ SLOC codebase based on QT. It made extensive use of Signals/Slots between objects. Even though I was pretty much the only developer working on

Re: [Development] Disabling exception support in QtCore?

2013-10-10 Thread Thiago Macieira
On quinta-feira, 10 de outubro de 2013 13:54:09, Alex Malyushytskyy wrote: It never worked.with other than direct connections. As I see it there is a simple choice either to provide indirect connections or propagate exceptions to signal. Otherwise you always have to assume that every slot is

Re: [Development] Disabling exception support in QtCore?

2013-10-05 Thread Olivier Goffart
On Thursday 03 October 2013 18:38:44 Thiago Macieira wrote: On quinta-feira, 3 de outubro de 2013 17:11:54, Alex Malyushytskyy wrote: Assuming exceptions are enabled for signal/slots what is going to happen with Qt::QueuedConnection? As far as I understand at this point you can't catch

Re: [Development] Disabling exception support in QtCore?

2013-10-04 Thread Marc Mutz
On 2013-10-04 07:34, Kurt Pattyn wrote: In some markets like Avionics and Defense, it is simply forbidden for us to use exceptions. The only reason to forbid exceptions on technical (as opposed to uneducated or -worse- political) grounds is in hard real-time systems, because throwing an

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Olivier Goffart
On Wednesday 02 October 2013 09:30:58 Thiago Macieira wrote: On quarta-feira, 2 de outubro de 2013 07:13:11, Knoll Lars wrote: +1. It's our decision not to use exceptions in Qt code, but I see quite a bit of value in being able to throw exceptions from a slot if that's the pattern a

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Kurt Pattyn
: From: Julien Blanc julien.bl...@nmc-company.fr Subject: Re: [Development] Disabling exception support in QtCore? Date: 3 Oct 2013 11:10:21 GMT+02:00 To: development@qt-project.org Le 03/10/2013 10:36, Olivier Goffart a écrit : On Wednesday 02 October 2013 09:30:58 Thiago Macieira wrote

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Thiago Macieira
On quinta-feira, 3 de outubro de 2013 10:36:44, Olivier Goffart wrote: I dislike allowing this via the signal-slot mechanism because I see throwing from a slot as incompatible with the connection semantics. That would mean any signal could throw ANY exception. It would also preempt

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Thiago Macieira
On quinta-feira, 3 de outubro de 2013 09:43:18, Marc Mutz wrote: Qt is a general-purpose framework library. As a library, its *only* purpose is to serve its users; as a framework, it mandates a certain structure on programs using it. As a general-purpose library, it can only assume very little

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Mandeep Sandhu
On Fri, Oct 4, 2013 at 7:08 AM, Thiago Macieira thiago.macie...@intel.comwrote: On quinta-feira, 3 de outubro de 2013 17:11:54, Alex Malyushytskyy wrote: Assuming exceptions are enabled for signal/slots what is going to happen with Qt::QueuedConnection? As far as I understand at this

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Nicolás Alvarez
2013/10/4 Kurt Pattyn pattyn.k...@gmail.com: In some markets like Avionics and Defense, it is simply forbidden for us to use exceptions. So, at least I think it should be possible to disable them in Qt if it was decided to allow them, otherwise we would be forced to use another framework.

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 05:42:24, Knoll Lars wrote: On 01.10.13 23:23, Thiago Macieira thiago.macie...@intel.com wrote: On terça-feira, 1 de outubro de 2013 20:00:56, Knoll Lars wrote: Yes, signal/slot connections between user code should IMO still be able to pass through

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 06:57:01, Thomas Sondergaard wrote: On 2013-10-01 21:20, Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing std::bad_alloc

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Olivier Goffart
On Tuesday 01 October 2013 23:32:00 Thiago Macieira wrote: On quarta-feira, 2 de outubro de 2013 05:42:24, Knoll Lars wrote: On 01.10.13 23:23, Thiago Macieira thiago.macie...@intel.com wrote: On terça-feira, 1 de outubro de 2013 20:00:56, Knoll Lars wrote: Yes, signal/slot connections

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Knoll Lars
On 02.10.13 09:09, Olivier Goffart oliv...@woboq.com wrote: On Tuesday 01 October 2013 23:32:00 Thiago Macieira wrote: On quarta-feira, 2 de outubro de 2013 05:42:24, Knoll Lars wrote: On 01.10.13 23:23, Thiago Macieira thiago.macie...@intel.com wrote: On terça-feira, 1 de outubro de 2013

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 07:13:11, Knoll Lars wrote: +1. It's our decision not to use exceptions in Qt code, but I see quite a bit of value in being able to throw exceptions from a slot if that's the pattern a developer chooses to use. We've been doing quite a bit of work to allow

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 09:09:16, Olivier Goffart wrote: It is working. We even got bug report for some corner case where it did not, and I fixed those. (so they are used) There is no test because you did not want to have one. But we could easily add more auto tests. (It is

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread André Pönitz
On Wed, Oct 02, 2013 at 06:57:01AM +0200, Thomas Sondergaard wrote: On 2013-10-01 21:20, Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing std::bad_alloc

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Charley Bay
On Wed, Oct 2, 2013 at 12:39 PM, André Pönitz andre.poen...@mathematik.tu-chemnitz.de wrote: On Wed, Oct 02, 2013 at 06:57:01AM +0200, Thomas Sondergaard wrote: On 2013-10-01 21:20, Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the

Re: [Development] Disabling exception support in QtCore?

2013-10-02 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 20:39:25, André Pönitz wrote: Size overhead for just enabling exceptions is (of course depending on actual model/implementation) typically cited as 5-10%, which incidentally matches Thiago's findings for Qt Core rather well. That's a pretty high price for

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Hausmann Simon
Hmm question - certainly worth it for sjlj platforms like 32-bit ios. One thing I'd love to see is the ability to throw exceptions through meta-call invocations (would be useful for qml, which uses exceptions) Simon Fra: Thiago Macieira Sendt: 21:20 tirsdag 1. oktober 2013 Til:

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Charley Bay
Thiago wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing std::bad_alloc through. Is it worth it? Should we disable exceptions in QtCore? No, and yes. ;-)) I vote not

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Knoll Lars
Yes, signal/slot connections between user code should IMO still be able to pass through exceptions. I am afraid removing that will break code that's out there. Cheers, Lars On 10/1/13 9:31 PM, Hausmann Simon simon.hausm...@digia.com wrote: Hmm question - certainly worth it for sjlj platforms

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread André Pönitz
On Tue, Oct 01, 2013 at 12:20:29PM -0700, Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing std::bad_alloc through. Is it worth it? Given that hoping that

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thiago Macieira
On terça-feira, 1 de outubro de 2013 19:31:05, Hausmann Simon wrote: Hmm question - certainly worth it for sjlj platforms like 32-bit ios. One thing I'd love to see is the ability to throw exceptions through meta-call invocations (would be useful for qml, which uses exceptions) The rule is:

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thiago Macieira
On terça-feira, 1 de outubro de 2013 20:00:56, Knoll Lars wrote: Yes, signal/slot connections between user code should IMO still be able to pass through exceptions. I am afraid removing that will break code that's out there. This is already forbidden since 5.0. You can throw from your slots,

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thiago Macieira
On terça-feira, 1 de outubro de 2013 22:28:53, André Pönitz wrote: Perhaps... do we have numbers how much the gain would actually be, say, for code size? Give me an hour. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Christoph Feck
On Tuesday 01 October 2013 21:20:29 Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing std::bad_alloc through. Is it worth it? Should we disable exceptions in

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thiago Macieira
On terça-feira, 1 de outubro de 2013 22:28:53, André Pönitz wrote: Perhaps... do we have numbers how much the gain would actually be, say, for code size? All numbers are based on my own QtCore tree, which contains a lot of patches on top of current stable, including protected visibility. I

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 00:04:58, Christoph Feck wrote: On Tuesday 01 October 2013 21:20:29 Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Christoph Feck
On Wednesday 02 October 2013 00:41:56 Thiago Macieira wrote: On quarta-feira, 2 de outubro de 2013 00:04:58, Christoph Feck wrote: On Tuesday 01 October 2013 21:20:29 Thiago Macieira wrote: Should we disable exceptions in QtCore? If it allows us to get a backtrace actually showing

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thiago Macieira
On quarta-feira, 2 de outubro de 2013 01:03:19, Christoph Feck wrote: In order to properly do that, we should remove all try/catch blocks in QtCore and replace with scoped pointers and scoped values. We should let the destructors handle the cleanup. Sounds a bit more work than simply

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Thomas Sondergaard
On 2013-10-01 21:20, Thiago Macieira wrote: Since we decided to roll back support for exceptions in our container classes, the only thing that currently needs exception support is the mainloop allowing std::bad_alloc through. Is it worth it? Should we disable exceptions in QtCore? As an

Re: [Development] Disabling exception support in QtCore?

2013-10-01 Thread Knoll Lars
On 01.10.13 23:23, Thiago Macieira thiago.macie...@intel.com wrote: On terça-feira, 1 de outubro de 2013 20:00:56, Knoll Lars wrote: Yes, signal/slot connections between user code should IMO still be able to pass through exceptions. I am afraid removing that will break code that's out there.