diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-17 19:17:38 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-17 19:17:38 +0800 |
| commit | cd515c85466049b8871737e5ad97fbe7c21a69bd (patch) | |
| tree | 73ecb19cb58675e3d71d4b02f8e97947c40fb883 /client/qt4 | |
| parent | 947225c69112e37f945b6eae5360b95f98675930 (diff) | |
| download | ibus-cd515c85466049b8871737e5ad97fbe7c21a69bd.tar.gz ibus-cd515c85466049b8871737e5ad97fbe7c21a69bd.tar.xz ibus-cd515c85466049b8871737e5ad97fbe7c21a69bd.zip | |
Refine coding style.
Diffstat (limited to 'client/qt4')
| -rw-r--r-- | client/qt4/ibus-input-context.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/client/qt4/ibus-input-context.cpp b/client/qt4/ibus-input-context.cpp index 9868912..4f36bf5 100644 --- a/client/qt4/ibus-input-context.cpp +++ b/client/qt4/ibus-input-context.cpp @@ -46,8 +46,9 @@ bool IBusInputContext::filterEvent (const QEvent *event) { #ifndef Q_WS_X11 - if (client->filterEvent (this, event)) + if (client->filterEvent (this, event)) { return true; + } return QInputContext::filterEvent (event); #else return QInputContext::filterEvent (event); @@ -90,8 +91,9 @@ IBusInputContext::update () { QWidget *widget = focusWidget (); - if (widget == NULL) + if (widget == NULL) { return; + } QRect rect = widget->inputMethodQuery(Qt::ImMicroFocus).toRect (); @@ -133,10 +135,12 @@ IBusInputContext::setFocusWidget (QWidget *widget) } else { /* KateView can not support preedit well. */ - if (widget->inherits("KateViewInternal")) + if (widget->inherits("KateViewInternal")) { client->setCapabilities (this, 0); - else + } + else { client->setCapabilities (this, 1); + } has_focus = true; client->focusIn (this); @@ -149,8 +153,9 @@ IBusInputContext::widgetDestroyed (QWidget *widget) { QInputContext::widgetDestroyed (widget); - if (has_focus) + if (has_focus) { setFocusWidget (NULL); + } update (); } @@ -159,8 +164,9 @@ IBusInputContext::widgetDestroyed (QWidget *widget) bool IBusInputContext::x11FilterEvent (QWidget *keywidget, XEvent *xevent) { - if (client->x11FilterEvent (this, keywidget, xevent)) + if (client->x11FilterEvent (this, keywidget, xevent)) { return true; + } return QInputContext::x11FilterEvent (keywidget, xevent); } #endif |
