[Development] Avoid overloading of 'error'

Koehne Kai Kai.Koehne at theqtcompany.com
Wed Jun 17 11:57:19 CEST 2015



> -----Original Message-----
> From: development-bounces+kai.koehne=theqtcompany.com at qt-
> [...]
> So I recommend we begin the shift now in 5.6 and deprecate the old
> methods, to be removed in 6.0.
>
> As for the implementation, please connect one signal to the other, so we
> don't need to duplicate the emissions. But note that there will be an delivery
> order
> problem: all slots connected to one signal will be received before all slots
> connected to the other. Unless Olivier adds a signal alias feature to moc :-)

I've put some patches that deprecate the 'error()' signals in favor of 'errorOccurred()' up for review in a topic branch #errorAmbiguity :

https://codereview.qt-project.org/#/q/topic:errorAmbiguity,n,z

(The networking one's probably still need some work in the autotests).


Regarding the property name, I'm not convinced anymore it's a good idea to change from 'error()' to 'lastError()': error() and errorString() are actually pretty common in a lot of classes, even one's that do not suffer from the naming clash (because they don't feature a signal).


Regards

Kai



More information about the Development mailing list