Review Request 117478: Convert dolphin (frameworks) to Qt5 signal/slot syntax

Frank Reininghaus frank78ac at googlemail.com
Tue May 27 13:54:27 BST 2014


Hi everyone,

sorry for not replying earlier in this thread.

2014-04-15 19:23 GMT+02:00 Olivier Goffart:
> On Tuesday 15 April 2014 09:47:13 Thiago Macieira wrote:
>> Em ter 15 abr 2014, às 02:36:58, Alexander Richardson escreveu:
>> > I didn't see see Thiago's message since I am not subscribed to kfm-devel.
>> > From what I saw in the Qt documentation I always assumed they were
>> > equivalent (except for not allowing default arguments in the slot), which
>> > other differences exist?
>>
>> The major difference is the problem of what gets called when the target
>> object is being destroyed. Olivier has more details.
>>
>> Olivier?
>
> In general, if it compiles, there is no difference.
>
> But there is some things to take care of:
> Using the string syntax, signals and slot behave as virtual, which means that
> the connection will use signals or slots in the most derived class with the
> same name if one exist even while connecting to the base class.  While the Qt5
> syntax really connects to the slot of the class specified.  In order to get
> the same behaviour, you need to mark the slot as virtual explicitly.
>
> And as Thiago mentioned there is also the problem that if a signal is emitted
> from a destructor and is connected to a slot of the object being destroyed,
> the slot will be called on the partially destroyed object.  This is more like
> a bug but i have no clear idea how to fix it.

Thank you very much for explaining the implications of the new
signal/slot syntax, Olivier and Thiago! Your help is greatly
appreciated.

As I said in the other thread some time ago, I think that the
mentioned differences between the "old" and "new" syntax will probably
not cause trouble in Dolphin, so the change was done some time ago.
Quite a few people have been testing the Qt5-based Dolphin in the
meantime, and while there are a few rough edges (which are mostly due
to changes in some of KDE's frameworks), no problems caused by the
signal/slot change have been found so far as far as I know.

Thanks again and best regards,
Frank




More information about the kfm-devel mailing list