summaryrefslogtreecommitdiffstats
path: root/plugins/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/src')
-rw-r--r--plugins/src/accessible/widgets/main.cpp2
-rw-r--r--plugins/src/accessible/widgets/tqaccessiblemenu.cpp26
-rw-r--r--plugins/src/accessible/widgets/tqaccessiblewidget.cpp126
-rw-r--r--plugins/src/imageformats/jpeg/main.cpp12
-rw-r--r--plugins/src/imageformats/mng/main.cpp8
-rw-r--r--plugins/src/imageformats/png/main.cpp12
-rw-r--r--plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp22
-rw-r--r--plugins/src/inputmethods/simple/qsimpleinputcontext.cpp36
-rw-r--r--plugins/src/inputmethods/xim/qximinputcontext_x11.cpp30
9 files changed, 137 insertions, 137 deletions
diff --git a/plugins/src/accessible/widgets/main.cpp b/plugins/src/accessible/widgets/main.cpp
index 184e2acb2..0a936b315 100644
--- a/plugins/src/accessible/widgets/main.cpp
+++ b/plugins/src/accessible/widgets/main.cpp
@@ -208,7 +208,7 @@ TQRESULT AccessibleFactory::createAccessibleInterface( const TQString &classname
bool AccessibleFactory::init()
{
- return TRUE;
+ return true;
}
void AccessibleFactory::cleanup()
diff --git a/plugins/src/accessible/widgets/tqaccessiblemenu.cpp b/plugins/src/accessible/widgets/tqaccessiblemenu.cpp
index 8b7c72631..c7d7670a6 100644
--- a/plugins/src/accessible/widgets/tqaccessiblemenu.cpp
+++ b/plugins/src/accessible/widgets/tqaccessiblemenu.cpp
@@ -46,7 +46,7 @@ int TQAccessiblePopup::controlAt( int x, int y ) const
{
TQPoint p = popupMenu()->mapFromGlobal( TQPoint( x,y ) );
MyPopupMenu *mp = (MyPopupMenu*)popupMenu();
- return mp->itemAtPos( p, FALSE ) + 1;
+ return mp->itemAtPos( p, false ) + 1;
}
int TQAccessiblePopup::navigate( NavDirection direction, int startControl ) const
@@ -142,29 +142,29 @@ TQAccessible::State TQAccessiblePopup::state( int control ) const
bool TQAccessiblePopup::doDefaultAction( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = popupMenu()->idAt( control -1 );
TQMenuItem *item = popupMenu()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
popupMenu()->activateItemAt( control - 1);
- return TRUE;
+ return true;
}
bool TQAccessiblePopup::setFocus( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = popupMenu()->idAt( control -1 );
TQMenuItem *item = popupMenu()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
popupMenu()->setActiveItem( control - 1 );
- return TRUE;
+ return true;
}
@@ -298,26 +298,26 @@ TQAccessible::State TQAccessibleMenuBar::state( int control ) const
bool TQAccessibleMenuBar::doDefaultAction( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = menuBar()->idAt( control -1 );
TQMenuItem *item = menuBar()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
menuBar()->activateItemAt( control - 1);
- return TRUE;
+ return true;
}
bool TQAccessibleMenuBar::setFocus( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = menuBar()->idAt( control -1 );
TQMenuItem *item = menuBar()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
diff --git a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp
index 6c5f30307..02c57eff8 100644
--- a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp
+++ b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp
@@ -33,7 +33,7 @@
TQString buddyString( TQWidget *widget )
{
TQWidget *parent = widget->parentWidget();
- TQObjectList *ol = parent->queryList( "TQLabel", 0, FALSE, FALSE );
+ TQObjectList *ol = parent->queryList( "TQLabel", 0, false, false );
if ( !ol || !ol->count() ) {
delete ol;
return TQString::null;
@@ -80,10 +80,10 @@ TQString hotKey( const TQString &text )
TQString n = text;
int fa = 0;
- bool ac = FALSE;
+ bool ac = false;
while ( ( fa = n.find( "&", fa ) ) != -1 ) {
if ( n.at(fa+1) != '&' ) {
- ac = TRUE;
+ ac = true;
break;
}
}
@@ -139,7 +139,7 @@ int TQAccessibleWidget::controlAt( int x, int y ) const
TQPoint rp = w->mapFromGlobal( TQPoint( x, y ) );
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
if ( !list || list->isEmpty() )
return 0;
@@ -187,14 +187,14 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
switch ( dir ) {
case NavFirstChild:
{
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
bool has = !list->isEmpty();
delete list;
return has ? 1 : -1;
}
case NavLastChild:
{
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
bool has = !list->isEmpty();
delete list;
return has ? childCount() : -1;
@@ -203,7 +203,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
case NavPrevious:
{
TQWidget *parent = w->parentWidget();
- TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, FALSE, FALSE ) : 0;
+ TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, false, false ) : 0;
if ( !sl )
return -1;
TQObject *sib;
@@ -243,7 +243,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
if ( !w2 )
return -1;
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
int index = list->findRef( w2 );
delete list;
return ( index != -1 ) ? index+1 : -1;
@@ -258,7 +258,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
/*! \reimp */
int TQAccessibleWidget::childCount() const
{
- TQObjectList *cl = widget()->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false );
if ( !cl )
return 0;
@@ -271,7 +271,7 @@ int TQAccessibleWidget::childCount() const
TQRESULT TQAccessibleWidget::queryChild( int control, TQAccessibleInterface **iface ) const
{
*iface = 0;
- TQObjectList *cl = widget()->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false );
if ( !cl )
return TQS_FALSE;
@@ -301,7 +301,7 @@ bool TQAccessibleWidget::doDefaultAction( int control )
#else
Q_UNUSED(control)
#endif
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -413,9 +413,9 @@ bool TQAccessibleWidget::setFocus( int control )
#endif
if ( widget()->focusPolicy() != TQWidget::NoFocus ) {
widget()->setFocus();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -424,7 +424,7 @@ bool TQAccessibleWidget::setSelected( int, bool, bool )
#if defined(QT_DEBUG)
tqWarning( "TQAccessibleWidget::setSelected: This function not supported for simple widgets." );
#endif
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -503,7 +503,7 @@ TQAccessibleButton::TQAccessibleButton( TQObject *o, Role role, TQString descrip
bool TQAccessibleButton::doDefaultAction( int control )
{
if ( !widget()->isEnabled() )
- return FALSE;
+ return false;
Role r = role(control);
if ( r == PushButton || r == CheckBox || r == RadioButton ) {
@@ -513,7 +513,7 @@ bool TQAccessibleButton::doDefaultAction( int control )
tb->openPopup();
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -791,14 +791,14 @@ bool TQAccessibleSpinWidget::doDefaultAction( int control )
switch( control ) {
case 1:
if ( !((TQSpinWidget*)widget())->isUpEnabled() )
- return FALSE;
+ return false;
((TQSpinWidget*)widget())->stepUp();
- return TRUE;
+ return true;
case 2:
if ( !((TQSpinWidget*)widget())->isDownEnabled() )
- return FALSE;
+ return false;
((TQSpinWidget*)widget())->stepDown();
- return TRUE;
+ return true;
default:
break;
}
@@ -987,18 +987,18 @@ bool TQAccessibleScrollBar::doDefaultAction( int control )
switch ( control ) {
case 1:
scrollBar()->subtractLine();
- return TRUE;
+ return true;
case 2:
scrollBar()->subtractPage();
- return TRUE;
+ return true;
case 4:
scrollBar()->addPage();
- return TRUE;
+ return true;
case 5:
scrollBar()->addLine();
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1164,12 +1164,12 @@ bool TQAccessibleSlider::doDefaultAction( int control )
switch ( control ) {
case 1:
slider()->subtractLine();
- return TRUE;
+ return true;
case 3:
slider()->addLine();
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1605,33 +1605,33 @@ TQAccessible::State TQAccessibleTabBar::state( int control ) const
bool TQAccessibleTabBar::doDefaultAction( int control )
{
if ( !control )
- return FALSE;
+ return false;
if ( control > tabBar()->count() ) {
TQAccessibleInterface *iface;
TQAccessibleWidget::queryChild( control - tabBar()->count(), &iface );
if ( !iface )
- return FALSE;
+ return false;
return iface->doDefaultAction( 0 );
}
TQTab *tab = tabBar()->tabAt( control - 1 );
if ( !tab || !tab->isEnabled() )
- return FALSE;
+ return false;
tabBar()->setCurrentTab( tab );
- return TRUE;
+ return true;
}
/*! \reimp */
bool TQAccessibleTabBar::setSelected( int control, bool on, bool extend )
{
if ( !control || !on || extend || control > tabBar()->count() )
- return FALSE;
+ return false;
TQTab *tab = tabBar()->tabAt( control - 1 );
if ( !tab || !tab->isEnabled() )
- return FALSE;
+ return false;
tabBar()->setCurrentTab( tab );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -1808,9 +1808,9 @@ TQAccessible::State TQAccessibleComboBox::state( int /*control*/ ) const
bool TQAccessibleComboBox::doDefaultAction( int control )
{
if ( control != 2 )
- return FALSE;
+ return false;
comboBox()->popup();
- return TRUE;
+ return true;
}
/*!
@@ -2014,20 +2014,20 @@ bool TQAccessibleTitleBar::doDefaultAction( int control )
titleBar()->window()->showNormal();
else
titleBar()->window()->showMinimized();
- return TRUE;
+ return true;
case 4:
if ( titleBar()->window()->isMaximized() )
titleBar()->window()->showNormal();
else
titleBar()->window()->showMaximized();
- return TRUE;
+ return true;
case 5:
titleBar()->window()->close();
- return TRUE;
+ return true;
default:
break;
}
- return FALSE;
+ return false;
}
@@ -2295,9 +2295,9 @@ bool TQAccessibleListBox::setFocus( int control )
TQListBoxItem *item = listBox()->item( control -1 );
if ( !item )
- return FALSE;
+ return false;
listBox()->setCurrentItem( item );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2306,11 +2306,11 @@ bool TQAccessibleListBox::setSelected( int control, bool on, bool extend )
if ( !control || ( extend &&
listBox()->selectionMode() != TQListBox::Extended &&
listBox()->selectionMode() != TQListBox::Multi ) )
- return FALSE;
+ return false;
TQListBoxItem *item = listBox()->item( control -1 );
if ( !item )
- return FALSE;
+ return false;
if ( !extend ) {
listBox()->setSelected( item, on );
} else {
@@ -2322,7 +2322,7 @@ bool TQAccessibleListBox::setSelected( int control, bool on, bool extend )
}
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2509,9 +2509,9 @@ bool TQAccessibleListView::setFocus( int control )
TQListViewItem *item = findLVItem( listView(), control );
if ( !item )
- return FALSE;
+ return false;
listView()->setCurrentItem( item );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2520,17 +2520,17 @@ bool TQAccessibleListView::setSelected( int control, bool on, bool extend )
if ( !control || ( extend &&
listView()->selectionMode() != TQListView::Extended &&
listView()->selectionMode() != TQListView::Multi ) )
- return FALSE;
+ return false;
TQListViewItem *item = findLVItem( listView(), control );
if ( !item )
- return FALSE;
+ return false;
if ( !extend ) {
listView()->setSelected( item, on );
} else {
TQListViewItem *current = listView()->currentItem();
if ( !current )
- return FALSE;
+ return false;
bool down = item->itemPos() > current->itemPos();
TQListViewItemIterator it( current );
while ( it.current() ) {
@@ -2543,7 +2543,7 @@ bool TQAccessibleListView::setSelected( int control, bool on, bool extend )
--it;
}
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2697,9 +2697,9 @@ bool TQAccessibleIconView::setFocus( int control )
TQIconViewItem *item = findIVItem( iconView(), control );
if ( !item )
- return FALSE;
+ return false;
iconView()->setCurrentItem( item );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2708,41 +2708,41 @@ bool TQAccessibleIconView::setSelected( int control, bool on, bool extend )
if ( !control || ( extend &&
iconView()->selectionMode() != TQIconView::Extended &&
iconView()->selectionMode() != TQIconView::Multi ) )
- return FALSE;
+ return false;
TQIconViewItem *item = findIVItem( iconView(), control );
if ( !item )
- return FALSE;
+ return false;
if ( !extend ) {
- iconView()->setSelected( item, on, TRUE );
+ iconView()->setSelected( item, on, true );
} else {
TQIconViewItem *current = iconView()->currentItem();
if ( !current )
- return FALSE;
- bool down = FALSE;
+ return false;
+ bool down = false;
TQIconViewItem *temp = current;
while ( ( temp = temp->nextItem() ) ) {
if ( temp == item ) {
- down = TRUE;
+ down = true;
break;
}
}
temp = current;
if ( down ) {
while ( ( temp = temp->nextItem() ) ) {
- iconView()->setSelected( temp, on, TRUE );
+ iconView()->setSelected( temp, on, true );
if ( temp == item )
break;
}
} else {
while ( ( temp = temp->prevItem() ) ) {
- iconView()->setSelected( temp, on, TRUE );
+ iconView()->setSelected( temp, on, true );
if ( temp == item )
break;
}
}
}
- return TRUE;
+ return true;
}
/*! \reimp */
diff --git a/plugins/src/imageformats/jpeg/main.cpp b/plugins/src/imageformats/jpeg/main.cpp
index 3d795b4b1..38ee23c68 100644
--- a/plugins/src/imageformats/jpeg/main.cpp
+++ b/plugins/src/imageformats/jpeg/main.cpp
@@ -34,7 +34,7 @@ TQStringList JPEGFormat::keys() const
bool JPEGFormat::loadImage( const TQString &format, const TQString &filename, TQImage *image )
{
if ( format != "JPEG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -42,13 +42,13 @@ bool JPEGFormat::loadImage( const TQString &format, const TQString &filename, TQ
read_jpeg_image( &io );
- return TRUE;
+ return true;
}
bool JPEGFormat::saveImage( const TQString &format, const TQString &filename, const TQImage &image )
{
if ( format != "JPEG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -56,16 +56,16 @@ bool JPEGFormat::saveImage( const TQString &format, const TQString &filename, co
write_jpeg_image( &io );
- return TRUE;
+ return true;
}
bool JPEGFormat::installIOHandler( const TQString &name )
{
if ( name.upper() != "JPEG" )
- return FALSE;
+ return false;
qInitJpegIO();
- return TRUE;
+ return true;
}
TQ_EXPORT_PLUGIN( JPEGFormat )
diff --git a/plugins/src/imageformats/mng/main.cpp b/plugins/src/imageformats/mng/main.cpp
index dee984499..468d1465e 100644
--- a/plugins/src/imageformats/mng/main.cpp
+++ b/plugins/src/imageformats/mng/main.cpp
@@ -33,21 +33,21 @@ TQStringList MNGFormat::keys() const
bool MNGFormat::loadImage( const TQString &, const TQString &, TQImage * )
{
- return FALSE;
+ return false;
}
bool MNGFormat::saveImage( const TQString &, const TQString &, const TQImage& )
{
- return FALSE;
+ return false;
}
bool MNGFormat::installIOHandler( const TQString &name )
{
if ( name != "MNG" )
- return FALSE;
+ return false;
qInitMngIO();
- return TRUE;
+ return true;
}
TQ_EXPORT_PLUGIN( MNGFormat )
diff --git a/plugins/src/imageformats/png/main.cpp b/plugins/src/imageformats/png/main.cpp
index d3bfb7a18..4bf219d4f 100644
--- a/plugins/src/imageformats/png/main.cpp
+++ b/plugins/src/imageformats/png/main.cpp
@@ -34,7 +34,7 @@ TQStringList PNGFormat::keys() const
bool PNGFormat::loadImage( const TQString &format, const TQString &filename, TQImage *image )
{
if ( format != "PNG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -42,13 +42,13 @@ bool PNGFormat::loadImage( const TQString &format, const TQString &filename, TQI
read_png_image( &io );
- return TRUE;
+ return true;
}
bool PNGFormat::saveImage( const TQString &format, const TQString &filename, const TQImage &image )
{
if ( format != "PNG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -56,16 +56,16 @@ bool PNGFormat::saveImage( const TQString &format, const TQString &filename, con
write_png_image( &io );
- return TRUE;
+ return true;
}
bool PNGFormat::installIOHandler( const TQString &name )
{
if ( name != "PNG" )
- return FALSE;
+ return false;
qInitPngIO();
- return TRUE;
+ return true;
}
TQ_EXPORT_PLUGIN( PNGFormat )
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;
}