diff options
Diffstat (limited to 'plugins/src/inputmethods/simple/qsimpleinputcontext.cpp')
-rw-r--r-- | plugins/src/inputmethods/simple/qsimpleinputcontext.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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 ) |