Revision: 6276
Author: nogu.dev
Date: Wed Mar 24 15:04:21 2010
Log: * qt4/immodule/Makefile.am
  - Remove debug.h to make it easy to debug functions.
* qt4/immodule/quiminputcontextplugin.pro.in
  - Ditto.
* qt4/immodule/debug.h
  - Remove.
* qt4/immodule/candidatewindow.cpp
  - Use ENABLE_DEBUG macro.
* qt4/immodule/plugin.cpp
  - Ditto.
* qt4/immodule/quiminputcontext.cpp
  - Ditto.
http://code.google.com/p/uim/source/detail?r=6276

Deleted:
 /trunk/qt4/immodule/debug.h
Modified:
 /trunk/qt4/immodule/Makefile.am
 /trunk/qt4/immodule/candidatewindow.cpp
 /trunk/qt4/immodule/plugin.cpp
 /trunk/qt4/immodule/quiminputcontext.cpp
 /trunk/qt4/immodule/quiminputcontextplugin.pro.in

=======================================
--- /trunk/qt4/immodule/debug.h Sun Feb 28 15:00:02 2010
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
-Copyright (c) 2007-2009 uim Project http://code.google.com/p/uim/
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. Neither the name of authors nor the names of its contributors
-may be used to endorse or promote products derived from this software
-without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-*/
-
-#ifndef UIM_QT4_IMMODULE_DEBUG_H
-#define UIM_QT4_IMMODULE_DEBUG_H
-
-#include <QtCore/QtGlobal>
-
-#ifdef QT_NO_DEBUG
-#undef qDebug
-#define qDebug if (true) ; else qDebug
-#endif
-
-#endif /* !defined(UIM_QT4_IMMODULE_DEBUG_H) */
=======================================
--- /trunk/qt4/immodule/Makefile.am     Sat Mar 20 16:08:15 2010
+++ /trunk/qt4/immodule/Makefile.am     Wed Mar 24 15:04:21 2010
@@ -24,7 +24,6 @@

 EXTRA_DIST += candidatewindow.h \
               caretstateindicator.h \
-              debug.h \
               plugin.h \
               qhelpermanager.h \
               qtextutil.h \
=======================================
--- /trunk/qt4/immodule/candidatewindow.cpp     Sun Mar 21 15:18:57 2010
+++ /trunk/qt4/immodule/candidatewindow.cpp     Wed Mar 24 15:04:21 2010
@@ -41,7 +41,6 @@

 #include <uim/uim-scm.h>

-#include "debug.h"
 #include "quiminputcontext.h"
 #include "subwindow.h"

=======================================
--- /trunk/qt4/immodule/plugin.cpp      Sat Mar 13 04:38:05 2010
+++ /trunk/qt4/immodule/plugin.cpp      Wed Mar 24 15:04:21 2010
@@ -43,7 +43,6 @@
 #include "uim/uim.h"
 #include "uim/uim-x-util.h"

-#include "debug.h"
 #include "quiminfomanager.h"
 #include "quiminputcontext_with_slave.h"

@@ -138,7 +137,9 @@

     // default
     lst.append( "uim" );
+#ifdef ENABLE_DEBUG
     qDebug( "name = uim" );
+#endif

 #if UIM_QT_LIST_SUBIM_AS_QTIM
     uim_context tmp_uc = uim_create_context( 0, "UTF-8",
@@ -153,7 +154,9 @@
             qs = "uim-" + qs;
             lst << qs;

+#ifdef ENABLE_DEBUG
             qDebug( "name = %s", qs.toUtf8().data() );
+#endif
         }
     }
     uim_release_context( tmp_uc );
=======================================
--- /trunk/qt4/immodule/quiminputcontext.cpp    Wed Mar 24 15:04:11 2010
+++ /trunk/qt4/immodule/quiminputcontext.cpp    Wed Mar 24 15:04:21 2010
@@ -48,7 +48,6 @@

 #include "candidatewindow.h"
 #include "caretstateindicator.h"
-#include "debug.h"
 #include "plugin.h"
 #include "qhelpermanager.h"
 #include "qtextutil.h"
@@ -84,7 +83,9 @@
         candwinIsActive( false ),
         m_isComposing( false )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "QUimInputContext()" );
+#endif

     contextList.append( this );

@@ -114,7 +115,9 @@

 QUimInputContext::~QUimInputContext()
 {
+#ifdef ENABLE_DEBUG
     qDebug( "~QUimInputContext()" );
+#endif

     contextList.removeAll( this );

@@ -188,7 +191,9 @@

 bool QUimInputContext::filterEvent( const QEvent *event )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "filterEvent" );
+#endif

     int type = event->type();

@@ -343,7 +348,9 @@

 void QUimInputContext::setFocusWidget( QWidget *w )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "QUimInputContext::setFocusWidget() w = %p", w );
+#endif

     QInputContext::setFocusWidget( w );

@@ -356,8 +363,10 @@
 // Qt4 does not have QInputContext::setFocus()
 void QUimInputContext::setFocus()
 {
+#ifdef ENABLE_DEBUG
     qDebug( "QUimInputContext: %p->setFocus(), focusWidget()=%p",
             this, QApplication::focusWidget() );
+#endif

     focusedInputContext = this;
     disableFocusedContext = false;
@@ -376,8 +385,10 @@
 // Qt4 does not have QInputContext::unsetFocus()
 void QUimInputContext::unsetFocus()
 {
+#ifdef ENABLE_DEBUG
     qDebug( "QUimInputContext: %p->unsetFocus(), focusWidget()=%p",
             this, QApplication::focusWidget() );
+#endif

     uim_focus_out_context( m_uc );

@@ -425,7 +436,9 @@

 void QUimInputContext::setMicroFocus( int x, int y, int w, int h )
 {
+#ifdef ENABLE_DEBUG
     qDebug("IC setMicroFocus (%d, %d), (%d, %d)", x, y, w, h);
+#endif

     cwin->layoutWindow( x, y, w, h );
 }
@@ -438,8 +451,12 @@
     case QEvent::MouseButtonRelease:
     case QEvent::MouseButtonDblClick:
     case QEvent::MouseMove:
+#ifdef ENABLE_DEBUG
         qDebug( "QUimInputContext::mouseHandler: "
                 "x=%d, type=%d, button=%d ", x, e->type(), e->button() );
+#else
+        Q_UNUSED( x )
+#endif
         break;
     default:
         break;
@@ -448,7 +465,9 @@

 void QUimInputContext::reset()
 {
+#ifdef ENABLE_DEBUG
     qDebug( "QUimInputContext::reset()" );
+#endif

     candwinIsActive = false;
     cwin->hide();
@@ -464,7 +483,9 @@
 {
     QWidget *w = QApplication::focusWidget();

+#ifdef ENABLE_DEBUG
     qDebug( "QUimInputContext::update() w = %p", w );
+#endif

     if ( w ) {
         QRect mf = w->inputMethodQuery( Qt::ImMicroFocus ).toRect();
@@ -489,7 +510,9 @@
 void QUimInputContext::commit_cb( void *ptr, const char *str )
 {
     QString qs = QString::fromUtf8( str );
+#ifdef ENABLE_DEBUG
     qDebug( "commit_cb : str = |%s|", qs.toLocal8Bit().data() );
+#endif

     QUimInputContext *ic = static_cast<QUimInputContext *>( ptr );
     ic->commitString( qs );
@@ -497,7 +520,9 @@

 void QUimInputContext::clear_cb( void *ptr )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "clear_cb" );
+#endif

     QUimInputContext* ic = static_cast<QUimInputContext*>( ptr );
     ic->clearPreedit();
@@ -506,7 +531,9 @@
 void QUimInputContext::pushback_cb( void *ptr, int attr, const char *str )
 {
     QString qs = QString::fromUtf8( str );
+#ifdef ENABLE_DEBUG
     qDebug( "pushback_cb :  str = |%s|", qs.toLocal8Bit().data() );
+#endif

     if ( !str )
         return ;
@@ -522,7 +549,9 @@

 void QUimInputContext::update_cb( void *ptr )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "update_cb" );
+#endif

     QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
     ic->updatePreedit();
@@ -530,7 +559,9 @@

void QUimInputContext::cand_activate_cb( void *ptr, int nr, int displayLimit )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "cand_activate_cb" );
+#endif

     QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
     ic->candidateActivate( nr, displayLimit );
@@ -538,7 +569,9 @@

 void QUimInputContext::cand_select_cb( void *ptr, int index )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "cand_select_cb" );
+#endif

     QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
     ic->candidateSelect( index );
@@ -546,7 +579,9 @@

 void QUimInputContext::cand_shift_page_cb( void *ptr, int forward )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "cand_shift_page_cb" );
+#endif

     QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
     ic->candidateShiftPage( forward != 0 );
@@ -554,7 +589,9 @@

 void QUimInputContext::cand_deactivate_cb( void *ptr )
 {
+#ifdef ENABLE_DEBUG
     qDebug( "cand_deactivate_cb" );
+#endif

     QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
     ic->candidateDeactivate();
=======================================
--- /trunk/qt4/immodule/quiminputcontextplugin.pro.in Sat Mar 20 16:08:15 2010 +++ /trunk/qt4/immodule/quiminputcontextplugin.pro.in Wed Mar 24 15:04:21 2010
@@ -25,7 +25,6 @@
 # Input
 HEADERS += @srcdir@/candidatewindow.h \
            @srcdir@/caretstateindicator.h \
-           @srcdir@/debug.h \
            @srcdir@/plugin.h \
            @srcdir@/qhelpermanager.h \
            @srcdir@/qtextutil.h \

To unsubscribe from this group, send email to uim-commit+unsubscribegooglegroups.com or 
reply to this email with the words "REMOVE ME" as the subject.

Reply via email to