[Konsole-devel] [Bug 49153] deattach/attach session -> key input is doubled

Simon Hausmann hausmann at kde.org
Mon Oct 21 09:21:59 UTC 2002


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
     
http://bugs.kde.org/show_bug.cgi?id=49153     




------- Additional Comments From hausmann at kde.org  2002-10-21 11:21 -------
OK, turned out not to be a real Qt bug. TEmulation declares the onKeyPress slot. TEmuVt102's   
declares the slot again, so the slot is listed twice, once in TEmulation's QMetaObject and once in    
TEmuVt102's one. But as the TEmulation constructor calls connectGUI at this time only the   
onKeyPressed slot of TEmulation is avaiable, because the vtbl of the object is not adjusted to   
TEmuVt102 yet, so the metaObject method still returns TEmulations' QMetaObject. As a result in   
the sender object the member index of TEmulation's onKeyPressed signal is stored (in the   
connection list) .  
  
At run-time it doesn't make a difference as the slot method was marked virtual.  
  
But when disconnecting metaObject() returns TEmuVt102's metaobject and there disconnect  
immediately finds the onKeyPressed slot and tries to disconnect that one. It fails however as the  
member index is different to the one in the base class.  
  
The fact that it worked with Qt 3.0.x I would call a fortune or something like relying on undefined  
behaviour :)  
  
Attachment 2 fixes the bug. 
 
Konsole developers, please approve both patches :)



More information about the konsole-devel mailing list