[bt-devel] problem

Joachim Ansorg bt-devel@crosswire.org
Sun, 10 Mar 2002 17:55:35 +0100


Hi Martin!

> Hello,

> void CKeyChooserWidget::slotComboChanged(int index)
> void CKeyChooserWidget::slotReturnPressed( const QString& text)

slotReturnPressed is used now. It was obviously a problem with the activated 
signal (not emitted when it was necessary).

CKComboBox inherits now from KComboBox, which provides a signal 
"returnPressed(const QString&)". This solution is cleaner and works (had to 
fix slotReturnPressed).

> bool CKCComboBox::eventFilter( QObject *o, QEvent *e )

eventFilter filters mainly focusOut events. But I did this a long time ago, 
it will probably need some fixes.

> function is buggy and filters out too many events?
> This looks strange:
>
> 	  else if (o == listBox()) {
> 			return false;
> 		}
> 	  else if (o == this) {
> 			emit activated(currentText());
> 			return true;
> 		}

If I remember right IO did this to avoid flickering (too many emitted 
signals).
But today I noticed that the focus out management doesn't work: Change the 
content of the book widget and click with the mouse into the HTML widget. 
Normally this should change the content of thr HTML widget ond refresh the 
keychoosers. But it doesn't work! But I'm sure it did!
Strange. But today I have no time to have a look at it. Do you like to try 
fixing this, Martin?

> We may think about reworking the keychoosers a bit, at the moment they are
> a little complicated and confusing, maybe even buggy. Or I may buggy too,
> not understanding how things work here. ;)

They ARE confusing. After 1.1 or 1.2 we should redisign their structure.

Joachim