diff options
Diffstat (limited to 'plugins/src/inputmethods')
3 files changed, 44 insertions, 44 deletions
diff --git a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp index 1a6924afc..99e86ae42 100644 --- a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp +++ b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp @@ -54,9 +54,9 @@ #define TQT_NO_IM_QMULTIINPUTCONTEXT_IMINDEX TQMultiInputContext::TQMultiInputContext() - : TQInputContext(), _slave( 0 ), imIndex( 0 ), cachedFocus( FALSE ), + : TQInputContext(), _slave( 0 ), imIndex( 0 ), cachedFocus( false ), cachedFocusWidget( 0 ), cachedHolderWidget( 0 ), - beIndirectlyConnected( FALSE ), popup( NULL ), currentIMKey( TQString::null ) + beIndirectlyConnected( false ), popup( NULL ), currentIMKey( TQString::null ) { keyDict.setAutoDelete( true ); keyDict.clear(); @@ -93,7 +93,7 @@ TQString TQMultiInputContext::language() #if defined(TQ_WS_X11) bool TQMultiInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) { - return ( slave() ) ? slave()->x11FilterEvent( keywidget, event ) : FALSE; + return ( slave() ) ? slave()->x11FilterEvent( keywidget, event ) : false; } #endif // TQ_WS_X11 @@ -111,16 +111,16 @@ bool TQMultiInputContext::filterEvent( const TQEvent *event ) ( keyevent->state() & TQt::AltButton ) ) { if ( keyevent->key() == TQt::Key_Up ) { changeInputMethod( --imIndex ); - return TRUE; + return true; } else if ( keyevent->key() == TQt::Key_Down ) { changeInputMethod( ++imIndex ); - return TRUE; + return true; } } } #endif - return ( slave() ) ? slave()->filterEvent( event ) : FALSE; + return ( slave() ) ? slave()->filterEvent( event ) : false; } void TQMultiInputContext::reset() @@ -132,14 +132,14 @@ void TQMultiInputContext::reset() void TQMultiInputContext::setFocus() { - cachedFocus = TRUE; + cachedFocus = true; if ( slave() ) slave()->setFocus(); } void TQMultiInputContext::unsetFocus() { - cachedFocus = FALSE; + cachedFocus = false; if ( slave() ) slave()->unsetFocus(); } @@ -180,7 +180,7 @@ void TQMultiInputContext::destroyInputContext() /*! This function is a placeholder for future experiment or extension - such as commit string snooping. set beIndirectlyConnected = TRUE + such as commit string snooping. set beIndirectlyConnected = true to activate this virtual function. */ void TQMultiInputContext::postIMEvent( TQObject *receiver, TQIMEvent *event ) @@ -225,12 +225,12 @@ void TQMultiInputContext::releaseComposingWidget( TQWidget *w ) bool TQMultiInputContext::isComposing() const { - return ( slave() ) ? slave()->isComposing() : FALSE; + return ( slave() ) ? slave()->isComposing() : false; } bool TQMultiInputContext::isPreeditRelocationEnabled() { - return ( slave() ) ? slave()->isPreeditRelocationEnabled() : FALSE; + return ( slave() ) ? slave()->isPreeditRelocationEnabled() : false; } TQInputContext *TQMultiInputContext::slave() diff --git a/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp b/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp index 6088eeaca..0c3f19089 100644 --- a/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp +++ b/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp @@ -88,20 +88,20 @@ class Cmp public: bool operator () (const TQComposeTableElement &lhs, const TQComposeTableElement &rhs) const { for ( size_t i=0; i < QT_KEYSEQUENCE_MAX_LEN; i++ ) { - if ( lhs.keys[i] < rhs.keys[i] ) return TRUE; + if ( lhs.keys[i] < rhs.keys[i] ) return true; else - if ( lhs.keys[i] > rhs.keys[i] ) return FALSE; + if ( lhs.keys[i] > rhs.keys[i] ) return false; } - return FALSE; + return false; } bool operator () (const TQComposeTableElement &lhs, const uint rhs[QT_KEYSEQUENCE_MAX_LEN]) const { for ( size_t i=0; i < QT_KEYSEQUENCE_MAX_LEN; i++ ) { - if ( lhs.keys[i] < rhs[i] ) return TRUE; + if ( lhs.keys[i] < rhs[i] ) return true; else - if ( lhs.keys[i] > rhs[i] ) return FALSE; + if ( lhs.keys[i] > rhs[i] ) return false; } - return FALSE; + return false; } }; @@ -119,14 +119,14 @@ TQSimpleInputContext::~TQSimpleInputContext() bool TQSimpleInputContext::filterEvent( const TQEvent *event ) { if ( event->type() != TQEvent::KeyPress ) - return FALSE; + return false; TQKeyEvent *keyevent = (TQKeyEvent *)event; int keyval = keyevent->key(); int val = 0; if ( isIgnoreKeys( keyval ) ) - return FALSE; + return false; if ( isComposingKeys( keyval ) ) { // If composing keys are pressed, use keyval directly @@ -134,7 +134,7 @@ bool TQSimpleInputContext::filterEvent( const TQEvent *event ) } else { TQString text = keyevent->text(); if ( text.isEmpty() ) - return FALSE; + return false; // If not composing keys are pressed, use the character's unicode value // NOTE : The contents of TQKeyEvent::text() is restricted to @@ -158,9 +158,9 @@ bool TQSimpleInputContext::filterEvent( const TQEvent *event ) // check sequence if( checkComposeTable( composeBuffer, &defaultComposeTable ) ) - return TRUE; + return true; - return FALSE; + return false; } void TQSimpleInputContext::setFocus() @@ -218,18 +218,18 @@ bool TQSimpleInputContext::isIgnoreKeys( int keyval ) { for ( uint i = 0; i < (sizeof(ignoreKeys)/sizeof(ignoreKeys[0])); i++ ) if ( keyval == ignoreKeys[i] ) - return TRUE; + return true; - return FALSE; + return false; } bool TQSimpleInputContext::isComposingKeys( int keyval ) { for ( uint i = 0; i < (sizeof(composingKeys)/sizeof(composingKeys[0])); i++ ) if ( keyval == composingKeys[i] ) - return TRUE; + return true; - return FALSE; + return false; } bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQComposeTable *composeTable ) @@ -243,7 +243,7 @@ bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQCompo if ( p == composeTable->data + composeTable->size ) { // tqDebug( "no match" ); clearComposeBuffer(); - return FALSE; + return false; } // check if compose buffer is matched @@ -252,7 +252,7 @@ bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQCompo // check if partial match if ( composeBuffer[i] == 0 && p->keys[i] ) { // tqDebug("partial match"); - return TRUE; + return true; } if ( composeBuffer[i] != p->keys[i] ) { @@ -268,7 +268,7 @@ bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQCompo commitChar( p->value ); clearComposeBuffer(); - return TRUE; + return true; } void TQSimpleInputContext::commitChar( uint c ) diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp index 33822a2b0..30d271faa 100644 --- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp +++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp @@ -68,7 +68,7 @@ static XIM qt_xim = 0; extern XIMStyle qt_xim_style; extern XIMStyle qt_xim_preferred_style; extern char *qt_ximServer; -static bool isInitXIM = FALSE; +static bool isInitXIM = false; static TQPtrList<TQXIMInputContext> *ximContextList = 0; #endif extern int qt_ximComposingKeycode; @@ -196,10 +196,10 @@ extern "C" { return 0; } - bool send_imstart = FALSE; + bool send_imstart = false; if( ! qic->isComposing() && qic->hasFocus() ) { qic->resetClientState(); - send_imstart = TRUE; + send_imstart = true; } else if ( ! qic->isComposing() || ! qic->hasFocus() ) { #ifdef QT_XIM_DEBUG tqDebug( "compose event: invalid compose event composing=%d hasFocus=%d", @@ -274,7 +274,7 @@ extern "C" { // figure out where the selection starts, and how long it is p = qic->selectedChars.data(); - bool started = FALSE; + bool started = false; for ( x = 0; x < TQMIN(qic->composingText.length(), qic->selectedChars.size()); ++x ) { if ( started ) { if ( *p ) ++sellen; @@ -282,7 +282,7 @@ extern "C" { } else { if ( *p ) { cursor = x; - started = TRUE; + started = true; sellen = 1; } } @@ -460,7 +460,7 @@ TQXIMInputContext::~TQXIMInputContext() // We prefer a less serious memory leak if( qt_xim ) { qt_xim = 0; - isInitXIM = FALSE; + isInitXIM = false; } delete ximContextList; @@ -476,7 +476,7 @@ void TQXIMInputContext::init_xim() { #ifndef TQT_NO_XIM if(!isInitXIM) - isInitXIM = TRUE; + isInitXIM = true; qt_xim = 0; TQString ximServerName(qt_ximServer); @@ -615,7 +615,7 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) // follwing codes don't exist #if 0 if ( event->type != XKeyPress || ! (qt_xim_style & XIMPreeditCallbacks) ) - return TRUE; + return true; /* * The Solaris htt input method will transform a ClientMessage @@ -626,7 +626,7 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) if ( ! keywidget ) { keywidget = (TQETWidget*)TQWidget::keyboardGrabber(); if ( keywidget ) { - grabbed = TRUE; + grabbed = true; } else { if ( focus_widget ) keywidget = (TQETWidget*)focus_widget; @@ -653,12 +653,12 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) */ if ( composing && focusWidget && qt_compose_emptied ) { XEvent event2; - bool found = FALSE; + bool found = false; if ( XCheckTypedEvent( TQPaintDevice::x11AppDisplay(), XKeyPress, &event2 ) ) { if ( event2.xkey.keycode == 0 ) { // found a key event with the 'commit' string - found = TRUE; + found = true; XPutBackEvent( TQPaintDevice::x11AppDisplay(), &event2 ); } } @@ -671,10 +671,10 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) focusWidget = 0; } - qt_compose_emptied = FALSE; + qt_compose_emptied = false; } #endif - return TRUE; + return true; } else if ( focusWidget() ) { if ( event->type == XKeyPress && event->xkey.keycode == 0 ) { // input method has sent us a commit string @@ -694,12 +694,12 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) sendIMEvent( TQEvent::IMEnd, inputText ); resetClientState(); - return TRUE; + return true; } } #endif // !TQT_NO_XIM - return FALSE; + return false; } |
