[immodule-qt] Status of Qt 4 port and some questions
Lars Knoll
lars at trolltech.com
Tue Oct 12 18:03:26 EEST 2004
Hi,
I'm finally back from my vacations and we have done most of the work of
importing your code to our current Qt4 branch. I'll shortly mention the
changes I have done up to now and then have some questions to you.
While importing the code into Qt4, I noticed, that some methods in the API
were not really needed and thus removed them:
I removed:
* QApplication::postIMEvent as it's nothing else than qApp->postEvent, and I
couldn't see why you would need a slot for this.
* QWidget::sendMouseEventToInputContext, as the method doesn't really do
whole lot (after I fixed QWidget::getInputContext() to create the input
context when needed).
* QInputContext::deletionRequested(). I could remove this signal by using a
QPointer for QWidgetPrivate::ic. Now you can just call "delete this" in case
of an fatal error in the input context without dangling pointers in other
places.
I renamed QWidget::getInputContext() to QWidget::inputContext() as the old
name doesn't fit with our naming conventions.
I will probably need to change a few more method names a little to fit our
naming conventions and to make it possible to implement text widgets in a
cross platform way (ie. QLineEdit should not have any #ifdef's for X11, and
should be able to achieve the same results on Qt/Windows).
Now my questions:
I had a look at your documentation of isPreeditRelocationEnabled(). As fas as
I understand you this is used to not loose the preedit string when focusing a
different widget. In this case the preedit string is transferred over to the
new focus widget. If I understand you correctly, this is just a hack to not
loose the string, and the correct behaviour would be to keep the preedit
string in the first widget so one can continue when focus comes back to it.
If that is indeed the desired behaviour, I think I might have a way to
implement it in the general framework without lots of additional work for the
implementors of input methods. I think it might at the same time enable text
widgets to support reconversion.
QInputContext::language() currently returns a QString. Wouldn't a QLocale
object be more correct?
The QInputContext::mouseHandler() method takes a parameter 'x'. Am I correct
that this is the current cursor position inside the preedit string?
As I was away for a while I haven't followed everything. Could you please tell
me what your current status on surrounding text support is?
Thanks,
Lars
More information about the immodule-qt
mailing list