[uim-commit] r477 - in trunk: . qt

kzk at freedesktop.org kzk at freedesktop.org
Wed Feb 2 07:17:39 PST 2005


Author: kzk
Date: 2005-02-02 07:17:36 -0800 (Wed, 02 Feb 2005)
New Revision: 477

Modified:
   trunk/configure.ac
   trunk/qt/Makefile.am
   trunk/qt/pref-customwidgets.cpp
Log:
* configure.ac
  - add --enable-qt-immodule configure option
* qt/Makefile.am
  - add CXXFLAGS to -DQT_IMMODULE when qt-immodule is enabled
* qt/pref-customwidgets.cpp
  - Key_Kanji, Key_Zenkaku_Hankaku, Key_Multi_key,
    Key_Mode_switch, and Key_Muhenkan are add in qt-immodule
    patch.


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-02-02 09:29:34 UTC (rev 476)
+++ trunk/configure.ac	2005-02-02 15:17:36 UTC (rev 477)
@@ -263,6 +263,24 @@
     use_qt="no"
   ])
 
+AC_ARG_ENABLE(qt-immodule,
+  AC_HELP_STRING([--enable-qt-immodule],
+                 [use qt-immodule extension]),
+  [
+    case $enable_qtimmodule in
+      no)
+        use_qtimmodule="no"
+      ;;
+      yes|*)
+        use_qtimmodule="yes"
+      ;;
+    esac
+
+  ],
+  [
+    use_qtimmodule="no"
+  ])
+
 AC_ARG_ENABLE(dummy,
   AC_HELP_STRING([--default-toolkit],
                  [Determine default toolkit]),
@@ -368,6 +386,7 @@
 AM_CONDITIONAL(DEFAULT_TOOLKIT_QT,  test x$default_toolkit = xqt)
 AM_CONDITIONAL(GNOME2, test x$use_gnome2 = xyes)
 AM_CONDITIONAL(QT, test x$use_qt = xyes)
+AM_CONDITIONAL(QT_IMMODULE, test x$use_qtimmodule = xyes)
 AM_CONDITIONAL(APPLET, test x$use_applet = xyes)
 AM_CONDITIONAL(UIM_FEP, test x$use_uim_fep = xyes)
 AM_CONDITIONAL(DICT, test x$use_dict = xyes)
@@ -446,6 +465,7 @@
     fi
     UIC=$HOST_UIC
 
+    # Process for compiler & linker flags
     QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL"
     if test -z "$enable_debug"; then
       QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG"
@@ -493,6 +513,20 @@
     AC_SUBST(UIM_QT_LDFLAGS)
 fi
 
+if test x$use_qt = xyes ; then
+    AC_MSG_CHECKING(for qt-immodue patch)
+    if test x$use_qtimmodule = xyes ; then
+        # Check for immodule for Qt patch
+        if test ! -e $QTDIR$QTINCDIR/qinputcontext.h -o ! -e $QTDIR$QTINCDIR/qinputcontextplugin.h; then
+          AC_MSG_RESULT(no)
+          $use_qtimmodule="cannot"
+        else
+	  AC_MSG_RESULT(yes)
+          AC_DEFINE(USE_QTIMMODULE, 1,
+                [use qt-immmodule])
+        fi
+    fi
+fi
 
 # add debugging flags to CFLAGS regardless of GCC=yes or not
 if test x$enable_debug = xyes; then
@@ -584,6 +618,7 @@
    Gnome           : ${use_gnome2}
    Gnome Applet    : ${use_applet}
    Qt              : ${use_qt}
+   Qt immodule     : ${use_qtimmodule}
    FEP             : ${use_uim_fep}
    DICT            : ${use_dict}
    Default toolkit : ${default_toolkit}

Modified: trunk/qt/Makefile.am
===================================================================
--- trunk/qt/Makefile.am	2005-02-02 09:29:34 UTC (rev 476)
+++ trunk/qt/Makefile.am	2005-02-02 15:17:36 UTC (rev 477)
@@ -1,3 +1,5 @@
+if QT
+
 INCLUDES        = -I$(top_srcdir) -I$(top_builddir)
 CXXFLAGS        += $(UIM_QT_CFLAGS)
 CFLAGS          += $(UIM_QT_CFLAGS)
@@ -2,2 +4,6 @@
 
+if QT_IMMODULE
+CXXFLAGS        += -DQT_IMMODULE
+endif
+
 HEADER_FILES = \
@@ -42,7 +48,6 @@
 	uim-im-switcher-qt \
 	uim-pref-qt
 
-
 # Toolbar Common
 noinst_LTLIBRARIES = libtoolbarcommon.la
 libtoolbarcommon_la_SOURCES = toolbar-common-quimhelpertoolbar.cpp toolbar-common-uimstateindicator.cpp
@@ -119,5 +124,4 @@
 	echo '#include "pref-keygrabformbase.moc"' >> pref-keygrabformbase.cpp.tmp
 	mv pref-keygrabformbase.cpp.tmp pref-keygrabformbase.cpp
 
-
-
+endif

Modified: trunk/qt/pref-customwidgets.cpp
===================================================================
--- trunk/qt/pref-customwidgets.cpp	2005-02-02 09:29:34 UTC (rev 476)
+++ trunk/qt/pref-customwidgets.cpp	2005-02-02 15:17:36 UTC (rev 477)
@@ -930,6 +930,7 @@
     case Qt::Key_End:
         editString.append( "end" );
         break;
+#ifdef QT_IMMODULE
     case Qt::Key_Kanji:
     case Qt::Key_Zenkaku_Hankaku:
         editString.append( "zenkaku-hankaku" );
@@ -943,6 +944,7 @@
     case Qt::Key_Muhenkan:
         editString.append( "Muhenkan" );
         break;
+#endif /* Def: QT_IMMODULE */
     case Qt::Key_Shift:
         m_shiftCheckBox->setChecked( true );
         editString.append( "Shift_key" );



More information about the Uim-commit mailing list