diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 330c33ab6f97b279737bf9527c9add7bb1475450 (patch) | |
tree | 85cb998d3077ae295d65944ebb4d0189fc660ead /kdevdesigner | |
parent | 093de0db4fea89b3f94a2359c6981f353d035eb7 (diff) | |
download | tdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.tar.gz tdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner')
45 files changed, 444 insertions, 444 deletions
diff --git a/kdevdesigner/LICENSE.GPL b/kdevdesigner/LICENSE.GPL index 2ad70b8b..c13faf0d 100644 --- a/kdevdesigner/LICENSE.GPL +++ b/kdevdesigner/LICENSE.GPL @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index f40739f4..c250f60e 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -378,7 +378,7 @@ void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); - else if ( w->isWidgetType() && formWindow->widgets()->tqfind( w ) ) { + else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) { formWindow->clearSelection( FALSE ); formWindow->selectWidget( w ); } @@ -392,7 +392,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * const int ID_DELETE = 1; const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; - TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( (TQWidget*)o ); + TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o ); if ( it != actionMap.end() && ::tqqt_cast<QSeparatorAction*>(*it) ) menu.insertItem( i18n( "Delete Separator" ), ID_DELETE ); else @@ -402,11 +402,11 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * menu.insertItem( i18n( "Delete Toolbar" ), ID_DELTOOLBAR ); int res = menu.exec( e->globalPos() ); if ( res == ID_DELETE ) { - TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( (TQWidget*)o ); + TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o ); if ( it == actionMap.end() ) return; TQAction *a = *it; - int index = actionList.tqfind( a ); + int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). tqarg( a->name() ).tqarg( caption() ), @@ -416,7 +416,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * } else if ( res == ID_SEP ) { calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); TQAction *a = new QSeparatorAction( 0 ); - int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) @@ -457,11 +457,11 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) void QDesignerToolBar::removeWidget( TQWidget *w ) { - TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( w ); + TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( w ); if ( it == actionMap.end() ) return; TQAction *a = *it; - int index = actionList.tqfind( a ); + int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). tqarg( a->name() ).tqarg( caption() ), @@ -478,13 +478,13 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) return; if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) return; - TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( (TQWidget*)o ); + TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o ); if ( it == actionMap.end() ) return; TQAction *a = *it; if ( !a ) return; - int index = actionList.tqfind( a ); + int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). tqarg( a->name() ).tqarg( caption() ), @@ -499,7 +499,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) TQStoredDrag *drag = new ActionDrag( type, a, this ); drag->setPixmap( a->iconSet().pixmap() ); if ( ::tqqt_cast<QDesignerAction*>(a) ) { - if ( formWindow->widgets()->tqfind( ( (QDesignerAction*)a )->widget() ) ) + if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); } if ( !drag->drag() ) { @@ -547,7 +547,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) indicator->hide(); TQAction *a = 0; - int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) @@ -562,7 +562,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) a = ::tqqt_cast<QDesignerActionGroup*>(ActionDrag::action()); } - if ( actionList.tqfindRef( a ) != -1 ) { + if ( actionList.findRef( a ) != -1 ) { TQMessageBox::warning( MainWindow::self, i18n( "Insert/Move Action" ), i18n( "Action '%1' has already been added to this toolbar.\n" "An Action may only occur once in a given toolbar." ). @@ -693,7 +693,7 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p ) installEventFilters( w ); MainWindow::self->formWindow()->insertWidget( w, TRUE ); QDesignerAction *a = new QDesignerAction( w, tqparent() ); - int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h index 8ee705c8..ee3e16ed 100644 --- a/kdevdesigner/designer/actiondnd.h +++ b/kdevdesigner/designer/actiondnd.h @@ -91,7 +91,7 @@ public: void init(); TQWidget *widget() const { return wid; } - TQWidget *widget( TQAction *a ) const { return *widgets.tqfind( a ); } + TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); } int index() const { return idx; } protected: diff --git a/kdevdesigner/designer/asciivalidator.cpp b/kdevdesigner/designer/asciivalidator.cpp index ae8661b4..3b1e4b45 100644 --- a/kdevdesigner/designer/asciivalidator.cpp +++ b/kdevdesigner/designer/asciivalidator.cpp @@ -85,7 +85,7 @@ TQValidator::State AsciiValidator::validate( TQString &s, int & ) const } } - if ( allowedChars.tqfind( s[ i ] ) != -1 ) + if ( allowedChars.find( s[ i ] ) != -1 ) continue; s[i] = '_'; diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index 63ed9e0a..8d3d5161 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -373,7 +373,7 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { TQObjectList *tqchildren = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQWidget *c = (TQWidget *)tqchildren->first(); c; c = (TQWidget *)tqchildren->next() ) { - if ( copyOfWidgets.tqfind( c ) == -1 && formWindow()->widgets()->tqfind( c ) ) { + if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { widgets.insert(widgets.at() + 1, c); widgets.prev(); copyOfWidgets.append(c); @@ -419,7 +419,7 @@ void DeleteCommand::unexecute() w->setName( s ); formWindow()->widgets()->insert( w, w ); formWindow()->selectWidget( TQT_TQOBJECT(w) ); - TQValueList<MetaDataBase::Connection> conns = *connections.tqfind( w ); + TQValueList<MetaDataBase::Connection> conns = *connections.find( w ); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, @@ -490,7 +490,7 @@ bool SetPropertyCommand::canMerge( Command *c ) if ( !widget ) return FALSE; const TQMetaProperty *p = - widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( propName, TRUE ), TRUE ); + widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, TRUE ), TRUE ); if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return TRUE; @@ -563,16 +563,16 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( select ) editor->propertyList()->setCurrentProperty( propName ); const TQMetaProperty *p = - widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( propName, TRUE ), TRUE ); + widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, TRUE ), TRUE ); if ( !p ) { if ( propName == "hAlign" ) { - p = widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( "tqalignment", TRUE ), TRUE ); + p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", TRUE ), TRUE ); int align = widget->property( "tqalignment" ).toInt(); align &= ~( AlignHorizontal_Mask ); align |= p->keyToValue( currentItemText ); widget->setProperty( "tqalignment", TQVariant( align ) ); } else if ( propName == "vAlign" ) { - p = widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( "tqalignment", TRUE ), TRUE ); + p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", TRUE ), TRUE ); int align = widget->property( "tqalignment" ).toInt(); align &= ~( AlignVertical_Mask ); align |= p->keyToValue( currentItemText ); @@ -1794,7 +1794,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T col.text = table->horizontalHeader()->label( i ); if ( table->horizontalHeader()->iconSet( i ) ) col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *columnFields.tqfind( col.text ); + col.field = *columnFields.find( col.text ); oldColumns.append( col ); } for ( i = 0; i < table->verticalHeader()->count(); ++i ) { @@ -2131,7 +2131,7 @@ void AddActionToPopupCommand::execute() void AddActionToPopupCommand::unexecute() { item->hideMenu(); - int i = menu->tqfind( item->action() ); + int i = menu->find( item->action() ); menu->remove( i ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2200,7 +2200,7 @@ RenameActionCommand::RenameActionCommand( const TQString &n, void RenameActionCommand::execute() { TQString actionText = newName; - actionText.tqreplace("&&", "&"); + actionText.replace("&&", "&"); TQString menuText = newName; action->setText( actionText ); action->setMenuText( menuText ); diff --git a/kdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h index 1a2bd1b8..438ed832 100644 --- a/kdevdesigner/designer/configtoolboxdialog.ui.h +++ b/kdevdesigner/designer/configtoolboxdialog.ui.h @@ -51,7 +51,7 @@ void ConfigToolboxDialog::init() a; a = MainWindow::self->toolActions.prev() ) { TQString grp = ( (WidgetAction*)a )->group(); - TQListViewItem *tqparent = groups.tqfind( grp ); + TQListViewItem *tqparent = groups.find( grp ); if ( !tqparent ) { tqparent = new TQListViewItem( listViewTools ); tqparent->setText( 0, grp ); diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index efb2406a..d43bb874 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -220,7 +220,7 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw ) TQPtrDictIterator<TQWidget> it( *formWindow->widgets() ); while ( it.current() ) { - if ( lst.tqfind( it.current()->name() ) != lst.end() ) { + if ( lst.find( it.current()->name() ) != lst.end() ) { ++it; continue; } @@ -277,7 +277,7 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw ) TQPtrDictIterator<TQWidget> it( *formWindow->widgets() ); while ( it.current() ) { - if ( lst.tqfind( it.current()->name() ) != lst.end() ) { + if ( lst.find( it.current()->name() ) != lst.end() ) { ++it; continue; } @@ -453,7 +453,7 @@ void SlotItem::updateSlotList() TQMetaData::Protected) ) && !ignoreSlot( md->tqt_mo_ci_name ) && checkConnectArgs( signal.latin1(), lastReceiver, md->tqt_mo_ci_name ) ) - if ( lst.tqfind( md->tqt_mo_ci_name ) == lst.end() ) + if ( lst.find( md->tqt_mo_ci_name ) == lst.end() ) lst << MetaDataBase::normalizeFunction( md->tqt_mo_ci_name ); } @@ -470,7 +470,7 @@ void SlotItem::updateSlotList() continue; s = MetaDataBase::normalizeFunction( s ); if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) { - if ( lst.tqfind( (*it).function ) == lst.end() ) + if ( lst.find( (*it).function ) == lst.end() ) lst << s; } } @@ -487,7 +487,7 @@ void SlotItem::updateSlotList() continue; s = MetaDataBase::normalizeFunction( s ); if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) { - if ( lst.tqfind( (*it).function ) == lst.end() ) + if ( lst.find( (*it).function ) == lst.end() ) lst << s; } } diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp index 3a1437ab..a5a270c6 100644 --- a/kdevdesigner/designer/customwidgeteditorimpl.cpp +++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp @@ -363,7 +363,7 @@ MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i ) if ( !i ) return 0; - TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.tqfind( i ); + TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i ); if ( it == customWidgets.end() ) return 0; return *it; @@ -461,7 +461,7 @@ void CustomWidgetEditor::signalNameChanged( const TQString &s ) if ( !w || listSignals->currentItem() == -1 ) return; - TQValueList<TQCString>::Iterator it = w->lstSignals.tqfind( listSignals->currentText().latin1() ); + TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() ); if ( it != w->lstSignals.end() ) w->lstSignals.remove( it ); listSignals->blockSignals( TRUE ); @@ -479,7 +479,7 @@ void CustomWidgetEditor::slotAccessChanged( const TQString &s ) MetaDataBase::Function slot; slot.function = listSlots->currentItem()->text( 0 ); slot.access = listSlots->currentItem()->text( 1 ); - TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.tqfind( slot ); + TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot ); if ( it != w->lstSlots.end() ) w->lstSlots.remove( it ); listSlots->currentItem()->setText( 1, s ); @@ -498,7 +498,7 @@ void CustomWidgetEditor::slotNameChanged( const TQString &s ) slot.function = listSlots->currentItem()->text( 0 ); slot.access = listSlots->currentItem()->text( 1 ); slot.type = "slot"; - TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.tqfind( slot ); + TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot ); if ( it != w->lstSlots.end() ) w->lstSlots.remove( it ); listSlots->currentItem()->setText( 0, s ); @@ -574,7 +574,7 @@ void CustomWidgetEditor::propertyTypeChanged( const TQString &s ) MetaDataBase::Property property; property.property = listProperties->currentItem()->text( 0 ); property.type = listProperties->currentItem()->text( 1 ); - TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.tqfind( property ); + TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property ); if ( it != w->lstProperties.end() ) w->lstProperties.remove( it ); listProperties->currentItem()->setText( 1, s ); @@ -592,7 +592,7 @@ void CustomWidgetEditor::propertyNameChanged( const TQString &s ) MetaDataBase::Property property; property.property = listProperties->currentItem()->text( 0 ); property.type = listProperties->currentItem()->text( 1 ); - TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.tqfind( property ); + TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property ); if ( it != w->lstProperties.end() ) w->lstProperties.remove( it ); listProperties->currentItem()->setText( 0, s ); @@ -671,11 +671,11 @@ static TQString makeIndent2( int indent ) static TQString entitize2( const TQString &s ) { TQString s2 = s; - s2 = s2.tqreplace( "\"", """ ); - s2 = s2.tqreplace( "&", "&" ); - s2 = s2.tqreplace( ">", ">" ); - s2 = s2.tqreplace( "<", "<" ); - s2 = s2.tqreplace( "'", "'" ); + s2 = s2.replace( "\"", """ ); + s2 = s2.replace( "&", "&" ); + s2 = s2.replace( ">", ">" ); + s2 = s2.replace( "<", "<" ); + s2 = s2.replace( "'", "'" ); return s2; } diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp index 0d4a5883..d564cd6c 100644 --- a/kdevdesigner/designer/designerappiface.cpp +++ b/kdevdesigner/designer/designerappiface.cpp @@ -732,7 +732,7 @@ TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIc void DesignerFormWindowImpl::addAction( TQAction *a ) { - if ( formWindow->actionList().tqfindRef( a ) != -1 ) + if ( formWindow->actionList().findRef( a ) != -1 ) return; formWindow->actionList().append( a ); MetaDataBase::addEntry( a ); @@ -770,7 +770,7 @@ void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQStr void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value ) { - int id = o->tqmetaObject()->tqfindProperty( property, TRUE ); + int id = o->tqmetaObject()->findProperty( property, TRUE ); const TQMetaProperty* p = o->tqmetaObject()->property( id, TRUE ); if ( p && p->isValid() ) o->setProperty( property, value ); @@ -780,7 +780,7 @@ void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, con TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const { - int id = o->tqmetaObject()->tqfindProperty( prop, TRUE ); + int id = o->tqmetaObject()->findProperty( prop, TRUE ); const TQMetaProperty* p = o->tqmetaObject()->property( id, TRUE ); if ( p && p->isValid() ) return o->property( prop ); diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp index 8a91c9f6..1c3e2bc9 100644 --- a/kdevdesigner/designer/editfunctionsimpl.cpp +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -175,10 +175,10 @@ void EditFunctions::okClicked() TQString s = function.function; s = s.simplifyWhiteSpace(); bool startNum = s[ 0 ] >= '0' && s[ 0 ] <= '9'; - bool noParens = s.tqcontains( '(' ) != 1 || s.tqcontains( ')' ) != 1; - bool illegalSpace = s.tqfind( ' ' ) != -1 && s.tqfind( ' ' ) < s.tqfind( '(' ); + bool noParens = s.contains( '(' ) != 1 || s.contains( ')' ) != 1; + bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' ); - if ( startNum || noParens || illegalSpace || lst.tqfind( function.function ) != -1 ) { + if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) { invalidFunctions = TRUE; invalidItems.append( (*it) ); continue; @@ -454,7 +454,7 @@ void EditFunctions::currentTypeChanged( const TQString &type ) void EditFunctions::changeItem( TQListViewItem *item, Attribute a, const TQString &nV ) { int itemId; - TQMap<TQListViewItem*, int>::Iterator fit = functionIds.tqfind( item ); + TQMap<TQListViewItem*, int>::Iterator fit = functionIds.find( item ); if ( fit != functionIds.end() ) itemId = *fit; else diff --git a/kdevdesigner/designer/finddialog.ui.h b/kdevdesigner/designer/finddialog.ui.h index 063d9156..126c0a5f 100644 --- a/kdevdesigner/designer/finddialog.ui.h +++ b/kdevdesigner/designer/finddialog.ui.h @@ -41,7 +41,7 @@ void FindDialog::doFind() if ( !editor ) return; - if ( !editor->tqfind( comboFind->currentText(), checkCase->isChecked(), + if ( !editor->find( comboFind->currentText(), checkCase->isChecked(), checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked() ) ) checkBegin->setChecked( TRUE ); else diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp index 1e9c489d..e485fbb9 100644 --- a/kdevdesigner/designer/formfile.cpp +++ b/kdevdesigner/designer/formfile.cpp @@ -50,17 +50,17 @@ static TQString make_func_pretty( const TQString &s ) { TQString res = s; - if ( res.tqfind( ")" ) - res.tqfind( "(" ) == 1 ) + if ( res.find( ")" ) - res.find( "(" ) == 1 ) return res; - res.tqreplace( "(", "( " ); - res.tqreplace( ")", " )" ); - res.tqreplace( "&", " &" ); - res.tqreplace( "*", " *" ); - res.tqreplace( ",", ", " ); - res.tqreplace( ":", " : " ); + res.replace( "(", "( " ); + res.replace( ")", " )" ); + res.replace( "&", " &" ); + res.replace( "*", " *" ); + res.replace( ",", ", " ); + res.replace( ":", " : " ); res = res.simplifyWhiteSpace(); - res.tqreplace( " : : ", "::" ); - res.tqreplace( ">>", "> >" ); + res.replace( " : : ", "::" ); + res.replace( ">>", "> >" ); return res; } @@ -111,7 +111,7 @@ void FormFile::setFileName( const TQString &fn ) return; if ( fn.isEmpty() ) { fileNameTemp = TRUE; - if ( filename.tqfind( "unnamed" ) != 0 ) + if ( filename.find( "unnamed" ) != 0 ) filename = createUnnamedFileName(); return; } else { @@ -249,7 +249,7 @@ bool FormFile::saveAs( bool ignoreModified ) TQString f = pro->makeAbsolute( fileName() ); if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { f = TQString( formWindow()->name() ).lower(); - f.tqreplace( "::", "_" ); + f.replace( "::", "_" ); f = pro->makeAbsolute( f + ".ui" ); } bool saved = FALSE; @@ -745,7 +745,7 @@ void FormFile::removeFunctionCode( MetaDataBase::Function function ) int line = 0; int start = 0; while ( line < (*fit).start - 1 ) { - start = sourceCode.tqfind( '\n', start ); + start = sourceCode.find( '\n', start ); if ( start == -1 ) return; start++; @@ -755,7 +755,7 @@ void FormFile::removeFunctionCode( MetaDataBase::Function function ) return; int end = start; while ( line < (*fit).end + 1 ) { - end = sourceCode.tqfind( '\n', end ); + end = sourceCode.find( '\n', end ); if ( end == -1 ) { if ( line <= (*fit).end ) end = sourceCode.length() - 1; @@ -777,7 +777,7 @@ void FormFile::functionNameChanged( const TQString &oldName, const TQString &new { if ( !cod.isEmpty() ) { TQString funcStart = TQString( formWindow()->name() ) + TQString( "::" ); - int i = cod.tqfind( funcStart + oldName ); + int i = cod.find( funcStart + oldName ); if ( i != -1 ) { cod.remove( i + funcStart.length(), oldName.length() ); cod.insert( i + funcStart.length(), newName ); @@ -791,7 +791,7 @@ void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &o TQString oldFunct = oldType + " " + TQString( formWindow()->name() ) + "::" + fuName; TQString newFunct = newType + " " + TQString( formWindow()->name() ) + "::" + fuName; - int i = cod.tqfind( oldFunct ); + int i = cod.find( oldFunct ); if ( i != -1 ) { cod.remove( i, oldFunct.length() ); cod.insert( i, newFunct ); @@ -816,7 +816,7 @@ TQString FormFile::formName() const while ( !ts.eof() ) { line = ts.readLine(); if ( !className.isEmpty() ) { - int end = line.tqfind( "</class>" ); + int end = line.find( "</class>" ); if ( end == -1 ) { className += line; } else { @@ -826,8 +826,8 @@ TQString FormFile::formName() const continue; } int start; - if ( ( start = line.tqfind( "<class>" ) ) != -1 ) { - int end = line.tqfind( "</class>" ); + if ( ( start = line.find( "<class>" ) ) != -1 ) { + int end = line.find( "</class>" ); if ( end == -1 ) { className = line.mid( start + 7 ); } else { diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index 312b543f..6070b378 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -95,7 +95,7 @@ static void setCursorToAll( const TQCursor &c, TQWidget *start ) static void restoreCursors( TQWidget *start, FormWindow *fw ) { - if ( fw->widgets()->tqfind( start ) ) + if ( fw->widgets()->find( start ) ) start->setCursor( MetaDataBase::cursor( start ) ); else start->setCursor( TQt::ArrowCursor ); @@ -258,7 +258,7 @@ void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e ) TQPixmap grid; TQString grid_name; grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y()); - if( !TQPixmapCache::tqfind( grid_name, grid ) ) { + if( !TQPixmapCache::find( grid_name, grid ) ) { grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) ); grid.fill( tqcolorGroup().color( TQColorGroup::Foreground ) ); TQBitmap tqmask( grid.width(), grid.height() ); @@ -435,10 +435,10 @@ void FormWindow::insertWidget() ++it; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.tqfind( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { + insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { TQRect r2( ( (TQWidget*)o )->pos(), ( (TQWidget*)o )->size() ); - if ( r.tqcontains( r2 ) ) + if ( r.contains( r2 ) ) lst.append( (TQWidget*)o ); } } @@ -542,7 +542,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) TQWidget *realWidget = w; // but store the original one while ( w->parentWidget() && ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || - !insertedWidgets.tqfind(w) ) ) + !insertedWidgets.find(w) ) ) w = w->parentWidget(); if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { e->accept(); @@ -599,7 +599,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) for ( TQObject *o = l->first(); o; o = l->next() ) { if ( !o->isWidgetType() ) continue; - if ( insertedWidgets.tqfind( (TQWidget*)o ) ) + if ( insertedWidgets.find( (TQWidget*)o ) ) selectWidget( TQT_TQOBJECT(o), FALSE ); } setPropertyShowingBlocked( FALSE ); @@ -619,7 +619,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) // if widget is laid out, find the first non-laid out super-widget while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w) ) ) + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) w = w->parentWidget(); if ( e->button() == Qt::LeftButton ) { // left button: store original tqgeometry and more as the widget might start moving @@ -677,7 +677,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) orderedWidgets.removeRef( w ); orderedWidgets.append( w ); for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { - int i = stackedWidgets.tqfindRef( wid ); + int i = stackedWidgets.findRef( wid ); if ( i != -1 ) { stackedWidgets.removeRef( wid ); stackedWidgets.insert( 0, wid ); @@ -723,7 +723,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) orderedWidgets.clear(); orderedWidgets.append( w ); for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { - int i = stackedWidgets.tqfindRef( wid ); + int i = stackedWidgets.findRef( wid ); if ( i != -1 ) { stackedWidgets.removeRef( wid ); stackedWidgets.insert( 0, wid ); @@ -757,7 +757,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) // if widget is laid out, find the first non-laid out super-widget while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w ) ) ) + ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.find(w ) ) ) w = w->parentWidget(); // calc correct position @@ -863,13 +863,13 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.tqfind( wid ) ) && wid->isVisibleTo( this ) ) + if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) newendWidget = wid; if ( ::tqqt_cast<TQLayoutWidget*>(newendWidget) || ::tqqt_cast<Spacer*>(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( newendWidget && - ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.tqfind( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) endWidget = newendWidget; mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).tqarg( startWidget->name() ). arg( endWidget->name() ) ); @@ -896,7 +896,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) drawRecRect = newendWidget != endWidget; if ( !newendWidget ) endWidget = newendWidget; - else if ( insertedWidgets.tqfind( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) endWidget = newendWidget; if ( endWidget ) mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).tqarg( startWidget->name() ). @@ -930,7 +930,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) if ( widgetPressed && allowMove( w ) ) { // we moved the widget sizePreviewLabel->hide(); - if ( moving.isEmpty() || w->pos() == *moving.tqfind(w) ) + if ( moving.isEmpty() || w->pos() == *moving.find(w) ) break; // restore targetContainer @@ -1163,7 +1163,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( !l ) return; - if ( l->tqfind( TQT_TQOBJECT(w) ) != -1 ) + if ( l->find( TQT_TQOBJECT(w) ) != -1 ) e->accept(); delete l; } @@ -1213,7 +1213,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) repaintSelection( (TQWidget*)opw ); if ( !isPropertyShowingBlocked() ) emitShowProperties( propertyWidget ); - WidgetSelection *s = usedSelections.tqfind( w ); + WidgetSelection *s = usedSelections.find( w ); if ( s ) { s->show(); return; @@ -1233,7 +1233,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) s->setWidget( w ); emitSelectionChanged(); } else { - WidgetSelection *s = usedSelections.tqfind( w ); + WidgetSelection *s = usedSelections.find( w ); if ( s ) s->setWidget( 0 ); TQObject *opw = propertyWidget; @@ -1258,7 +1258,7 @@ TQPoint FormWindow::grid() const void FormWindow::updateSelection( TQWidget *w ) { - WidgetSelection *s = usedSelections.tqfind( w ); + WidgetSelection *s = usedSelections.find( w ); if ( !w->isVisibleTo( this ) ) selectWidget( TQT_TQOBJECT(w), FALSE ); else if ( s ) @@ -1267,14 +1267,14 @@ void FormWindow::updateSelection( TQWidget *w ) void FormWindow::raiseSelection( TQWidget *w ) { - WidgetSelection *s = usedSelections.tqfind( w ); + WidgetSelection *s = usedSelections.find( w ); if ( s ) s->show(); } void FormWindow::repaintSelection( TQWidget *w ) { - WidgetSelection *s = usedSelections.tqfind( w ); + WidgetSelection *s = usedSelections.find( w ); if ( s ) s->update(); } @@ -1373,7 +1373,7 @@ void FormWindow::selectWidgets() TQPoint p = ( (TQWidget*)o )->mapToGlobal( TQPoint(0,0) ); p = mapFromGlobal( p ); TQRect r( p, ( (TQWidget*)o )->size() ); - if ( r.intersects( currRect ) && !r.tqcontains( currRect ) ) + if ( r.intersects( currRect ) && !r.contains( currRect ) ) selectWidget( TQT_TQOBJECT(o) ); } } @@ -1385,7 +1385,7 @@ void FormWindow::selectWidgets() bool FormWindow::isWidgetSelected( TQObject *w ) { if ( w->isWidgetType() ) - return usedSelections.tqfind( (TQWidget*)w ) != 0; + return usedSelections.find( (TQWidget*)w ) != 0; return FALSE; // #### do stuff for TQObjects } @@ -1428,7 +1428,7 @@ void FormWindow::raiseChildSelections( TQWidget *w ) TQPtrDictIterator<WidgetSelection> it( usedSelections ); for ( ; it.current(); ++it ) { - if ( l->tqfindRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) + if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) it.current()->show(); } delete l; @@ -1440,7 +1440,7 @@ void FormWindow::updateChildSelections( TQWidget *w ) if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o->isWidgetType() && - insertedWidgets.tqfind( (TQWidget*)o ) ) + insertedWidgets.find( (TQWidget*)o ) ) updateSelection( (TQWidget*)o ); } delete l; @@ -1460,7 +1460,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) if ( it.current()->widget() == mainContainer() ) continue; ++it; - if ( l->tqfind( TQT_TQOBJECT(sel->widget()) ) == -1 ) { + if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) sel->setWidget( 0 ); } else { @@ -1569,7 +1569,7 @@ void FormWindow::invalidCheckedSelections() void FormWindow::checkPreviewGeometry( TQRect &r ) { - if ( !TQT_TQRECT_OBJECT(rect()).tqcontains( r ) ) { + if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) { if ( r.left() < rect().left() ) r.moveTopLeft( TQPoint( 0, r.top() ) ); if ( r.right() > rect().right() ) @@ -1782,7 +1782,7 @@ void FormWindow::showOrderIndicators() w->focusPolicy() != TQ_NoFocus ) { OrderIndicator* ind = new OrderIndicator( order++, w, this ); orderIndicators.append( ind ); - if ( stackedWidgets.tqfindRef( w ) == -1 ) + if ( stackedWidgets.findRef( w ) == -1 ) stackedWidgets.append( w ); } } @@ -1881,14 +1881,14 @@ void FormWindow::lowerWidgets() void find_accel( const TQString &txt, TQMap<TQChar, TQWidgetList > &accels, TQWidget *w ) { - int i = txt.tqfind( "&" ); + int i = txt.find( "&" ); if ( i == -1 ) return; TQChar c = txt[ i + 1 ]; if ( c.isNull() || c == '&' ) return; c = c.lower(); - TQMap<TQChar, TQWidgetList >::Iterator it = accels.tqfind( c ); + TQMap<TQChar, TQWidgetList >::Iterator it = accels.find( c ); if ( it == accels.end() ) { TQWidgetList wl; wl.append( w ); @@ -1910,11 +1910,11 @@ void FormWindow::checkAccels() insertedWidgets[ (void*)o ] ) { TQWidget *w = (TQWidget*)o; const TQMetaProperty* text = - w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "text", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "text", TRUE ), TRUE ); const TQMetaProperty* title = - w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "title", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "title", TRUE ), TRUE ); const TQMetaProperty* pageTitle = - w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "pageTitle", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "pageTitle", TRUE ), TRUE ); if ( text ) find_accel( w->property( "text" ).toString(), accels, w ); if ( title ) @@ -2060,7 +2060,7 @@ void FormWindow::layoutHorizontalContainer( TQWidget *w ) for ( TQObject *o = l.first(); o; o = l.next() ) { if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.tqfind( (TQWidget*)o ) ) + insertedWidgets.find( (TQWidget*)o ) ) widgets.append( (TQWidget*)o ); } LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out ChildrenQt::Horizontally" ), @@ -2081,7 +2081,7 @@ void FormWindow::layoutVerticalContainer( TQWidget *w ) for ( TQObject *o = l.first(); o; o = l.next() ) { if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.tqfind( (TQWidget*)o ) ) + insertedWidgets.find( (TQWidget*)o ) ) widgets.append( (TQWidget*)o ); } LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out ChildrenQt::Vertically" ), @@ -2105,7 +2105,7 @@ void FormWindow::layoutGridContainer( TQWidget *w ) for ( TQObject *o = l.first(); o; o = l.next() ) { if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.tqfind( (TQWidget*)o ) ) + insertedWidgets.find( (TQWidget*)o ) ) widgets.append( (TQWidget*)o ); } LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ), @@ -2157,7 +2157,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) if ( o->isWidgetType() && !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.tqfind( (TQWidget*)o ) ) + insertedWidgets.find( (TQWidget*)o ) ) widgets.append( (TQWidget*)o ); } return new BreakLayoutCommand( i18n( "Break Layout" ), this, WidgetFactory::widgetOfContainer( w ), widgets ); @@ -2190,7 +2190,7 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) && - insertedWidgets.tqfind( (TQWidget*)o ) ) { + insertedWidgets.find( (TQWidget*)o ) ) { delete l; return TRUE; } @@ -2204,7 +2204,7 @@ bool FormWindow::allowMove( TQWidget *w ) { w = w->parentWidget(); while ( w ) { - if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.tqfind( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) return TRUE; w = w->parentWidget(); } @@ -2280,7 +2280,7 @@ void FormWindow::restoreConnectionLine() w = h = 64; r = r.normalize(); - while ( r.tqcontains( p ) ) { + while ( r.contains( p ) ) { unclippedPainter->drawPixmap( p, *buffer, TQRect( p, TQSize( w, h ) ) ); unclippedPainter->setPen( red ); p.setX( p.x() + dx ); @@ -2451,7 +2451,7 @@ bool FormWindow::isDatabaseWidgetUsed() const TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current(); ++it ) { TQString c( it.current()->className() ); - if ( dbClasses.tqcontains( c ) > 0 ) { + if ( dbClasses.contains( c ) > 0 ) { return TRUE; } } @@ -2525,7 +2525,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) TQWidget *container = 0; int depth = -1; TQWidgetList selected = selectedWidgets(); - if ( TQT_TQRECT_OBJECT(rect()).tqcontains( mapFromGlobal( pos ) ) ) { + if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) { container = mainContainer(); depth = widgetDepth( container ); } @@ -2536,7 +2536,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) continue; if ( !it.current()->isVisibleTo( this ) ) continue; - if ( selected.tqfind( it.current() ) != -1 ) + if ( selected.find( it.current() ) != -1 ) continue; if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && it.current() != mainContainer() ) @@ -2545,7 +2545,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) // the rectangles of all ancestors of the container must contain the insert position TQWidget *w = it.current(); while ( w && !w->isTopLevel() ) { - if ( !TQT_TQRECT_OBJECT(w->rect()).tqcontains( ( w->mapFromGlobal( pos ) ) ) ) + if ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) ) break; w = w->parentWidget(); } @@ -2553,8 +2553,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) int wd = widgetDepth( it.current() ); if ( wd == depth && container ) { - if ( ( it.current()->parentWidget()->childrenListObject() ).tqfind( TQT_TQOBJECT(it.current()) ) > - ( container->parentWidget()->childrenListObject() ).tqfind( TQT_TQOBJECT(container) ) ) + if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > + ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) wd++; } if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index 5f747a37..a617ac31 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -257,7 +257,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) } if ( o->isWidgetType() ) { TQWidget *w = (TQWidget*)o; - if ( !formWindow->widgets()->tqfind( w ) ) { + if ( !formWindow->widgets()->find( w ) ) { if ( ::tqqt_cast<TQWidgetStack*>(w->tqparent()) ) { if (::tqqt_cast<TQTabWidget*>(w->tqparent()->tqparent()) ) { ((TQTabWidget*)w->tqparent()->tqparent())->showPage( w ); @@ -477,7 +477,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() ) continue; - if ( !formWindow->widgets()->tqfind( (TQWidget*)it.current() ) ) { + if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { if ( ::tqqt_cast<TQWidgetStack*>(it.current()->tqparent()) || ::tqqt_cast<TQWidgetStack*>(it.current()) ) { TQObject *obj = it.current(); @@ -488,7 +488,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) stack = (TQWidgetStack*)obj; else stack = (TQWidgetStack*)obj->tqparent(); - if ( widgetStacks->tqfindRef( stack ) != -1 ) + if ( widgetStacks->findRef( stack ) != -1 ) continue; widgetStacks->append( stack ); TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); @@ -599,7 +599,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) return; if ( !o->isWidgetType() || - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->tqfind( (TQWidget*)o ) ) ) + ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) return; TQWidget *w = (TQWidget*)o; diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp index b79604bf..cda34aba 100644 --- a/kdevdesigner/designer/kdevdesigner_part.cpp +++ b/kdevdesigner/designer/kdevdesigner_part.cpp @@ -54,7 +54,7 @@ KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widge setWidget(m_widget); setupActions(); - if (args.tqcontains("in shell")) + if (args.contains("in shell")) setXMLFile("kdevdesigner_part_sh.rc"); else setXMLFile("kdevdesigner_part.rc"); diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index 450f4633..8dd642b8 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -197,7 +197,7 @@ void Layout::finishLayout( bool needMove, TQLayout *tqlayout ) formWindow->insertWidget( layoutBase ); formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); TQString n = layoutBase->name(); - if ( n.tqfind( "qt_dead_widget_" ) != -1 ) { + if ( n.find( "qt_dead_widget_" ) != -1 ) { n.remove( 0, TQString( "qt_dead_widget_" ).length() ); layoutBase->setName( n ); } @@ -250,7 +250,7 @@ void Layout::breakLayout() w->reparent( layoutBase->parentWidget(), 0, layoutBase->pos() + w->pos(), TRUE ); if ( needResize ) { - TQMap<TQWidget*, TQRect>::Iterator it = rects.tqfind( w ); + TQMap<TQWidget*, TQRect>::Iterator it = rects.find( w ); if ( it != rects.end() ) w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); } diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 87e15a74..8ad20987 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -142,7 +142,7 @@ static TQString textNoAccel( const TQString& text) { TQString t = text; int i; - while ( (i = t.tqfind('&') )>= 0 ) { + while ( (i = t.find('&') )>= 0 ) { t.remove(i,1); } return t; @@ -753,10 +753,10 @@ void MainWindow::helpContents() TQTextStream ts( &f ); while ( !ts.eof() ) { TQString s = ts.readLine(); - int from = s.tqfind( "\"" ); + int from = s.find( "\"" ); if ( from == -1 ) continue; - int to = s.tqfindRev( "\"" ); + int to = s.findRev( "\"" ); if ( to == -1 ) continue; propertyDocumentation[ s.mid( from + 1, to - from - 1 ) ] = s.mid( to + 2 ) + "-prop"; @@ -782,7 +782,7 @@ void MainWindow::helpContents() else source = propertyDocumentation[ "TQObject/name" ]; } else { - while ( mo && !propertyDocumentation.tqcontains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) + while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) mo = mo->tqsuperClass(); if ( mo ) source = "p:" + propertyDocumentation[s]; @@ -945,7 +945,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<PopupMenuEditor*>(o) ) { PopupMenuEditor *m = ::tqqt_cast<PopupMenuEditor*>(o); PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); - if ( m->tqfind( i->action() ) != -1 && !i->isSeparator() ) + if ( m->find( i->action() ) != -1 && !i->isSeparator() ) showProperties( i->action() ); } return TQMainWindow::eventFilter( o, e ); @@ -1262,7 +1262,7 @@ FormWindow *MainWindow::formWindow() if ( ::tqqt_cast<FormWindow*>(qworkspace->activeWindow()) ) fw = (FormWindow*)qworkspace->activeWindow(); else if ( lastActiveFormWindow && - qworkspace->windowList().tqfind( lastActiveFormWindow ) != -1) + qworkspace->windowList().find( lastActiveFormWindow ) != -1) fw = lastActiveFormWindow; return fw; } @@ -1554,18 +1554,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w ) { - const TQMetaProperty* text = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* text = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "text", TRUE ), TRUE ); if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) text = 0; - const TQMetaProperty* title = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* title = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "title", TRUE ), TRUE ); if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) title = 0; const TQMetaProperty* pagetitle = - w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "pageTitle", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "pageTitle", TRUE ), TRUE ); if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = - w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "pixmap", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "pixmap", TRUE ), TRUE ); if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) pixmap = 0; @@ -2132,7 +2132,7 @@ void MainWindow::selectionChanged() static TQString fixArgs( const TQString &s2 ) { TQString s = s2; - return s.tqreplace( ',', ';' ); + return s.replace( ',', ';' ); } void MainWindow::writeConfig() @@ -2242,7 +2242,7 @@ void MainWindow::writeConfig() static TQString fixArgs2( const TQString &s2 ) { TQString s = s2; - return s.tqreplace( ';', ',' ); + return s.replace( ';', ',' ); } void MainWindow::readConfig() @@ -2290,14 +2290,14 @@ void MainWindow::readConfig() } // We know that the oldSettingsKey() will return 3.1 if ( keybase == DesignerApplication::oldSettingsKey() ) { - if (keybase.tqcontains("3.1")) + if (keybase.contains("3.1")) recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles", ',' ); else recentlyFiles = config.readListEntry(keybase + "RecentlyOpenedFiles"); if ( recentlyFiles.count() == 1 && recentlyFiles[0].isNull() ) recentlyFiles.clear(); - if (keybase.tqcontains("3.1")) + if (keybase.contains("3.1")) recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects", ',' ); else recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects"); @@ -2574,7 +2574,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) TQString fullSignal; for ( int i = 0; i < (int)sigs.count(); ++i ) { TQString sig = sigs.at( i ); - if ( sig.left( sig.tqfind( '(' ) ) == defSignal ) { + if ( sig.left( sig.find( '(' ) ) == defSignal ) { fullSignal = sig; break; } @@ -2582,14 +2582,14 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( !fullSignal.isEmpty() ) { TQString signl = fullSignal; - fullSignal = fullSignal.mid( fullSignal.tqfind( '(' ) + 1 ); + fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 ); fullSignal.remove( (int)fullSignal.length() - 1, 1 ); fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); s += "(" + fullSignal + ")"; if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", f->project()->language(), "void" ); - s = s.left( s.tqfind( '(' ) ).latin1(); + s = s.left( s.find( '(' ) ).latin1(); if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { MetaDataBase::Connection conn; conn.sender = TQT_TQOBJECT(w); @@ -2617,8 +2617,8 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) return TRUE; } - const TQMetaProperty* text = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* text = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* title = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "title", TRUE ), TRUE ); if ( text && text->designable(w) ) { bool ok = FALSE; bool oldDoWrap = FALSE; @@ -2804,7 +2804,7 @@ void MainWindow::projectSelected( TQAction *a ) a->setOn( TRUE ); if ( currentProject ) currentProject->setActive( FALSE ); - Project *p = *projects.tqfind( a ); + Project *p = *projects.find( a ); p->setActive( TRUE ); if ( currentProject == p ) return; @@ -2881,9 +2881,9 @@ void MainWindow::showDialogHelp() else if ( ::tqqt_cast<ProjectSettingsBase*>(w) ) link += "dialog-project-settings"; else if ( ::tqqt_cast<FindDialog*>(w) ) - link += "dialog-tqfind-text"; + link += "dialog-find-text"; else if ( ::tqqt_cast<ReplaceDialog*>(w) ) - link += "dialog-tqreplace-text"; + link += "dialog-replace-text"; else if ( ::tqqt_cast<GotoLineDialog*>(w) ) link += "dialog-go-to-line"; // else if ( ::tqqt_cast<ConnectionEditorBase*>(w) ) @@ -3099,7 +3099,7 @@ void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst ) TQFileInfo fi( fn ); fi.convertToAbs(); TQString f = fi.filePath(); - if ( lst.tqfind( f ) != lst.end() ) + if ( lst.find( f ) != lst.end() ) lst.remove( f ); if ( lst.count() >= 10 ) lst.pop_back(); @@ -3210,7 +3210,7 @@ void MainWindow::setModified( bool b, TQWidget *window ) void MainWindow::editorClosed( SourceEditor *e ) { - sourceEditors.take( sourceEditors.tqfindRef( e ) ); + sourceEditors.take( sourceEditors.findRef( e ) ); } void MainWindow::functionsChanged() @@ -3422,7 +3422,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) mblockNewForms = TRUE; if ( !fw ) - openFormWindow( currentProject->makeAbsolute( *qwf_forms->tqfind( (TQWidget*)o ) ) ); + openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); else fw->formFile()->showEditor( FALSE ); tqApp->processEvents(); // give all views the chance to get the formwindow @@ -3620,13 +3620,13 @@ TQString MainWindow::whatsThisFrom( const TQString &key ) } } - int i = menuHelpFile.tqfind( key ); + int i = menuHelpFile.find( key ); if ( i == -1 ) return TQString(); int start = i; int end = i; - start = menuHelpFile.tqfindRev( "<li>", i ) + 4; - end = menuHelpFile.tqfind( '\n', i ) - 1; + start = menuHelpFile.findRev( "<li>", i ) + 4; + end = menuHelpFile.find( '\n', i ) - 1; return menuHelpFile.mid( start, end - start + 1 ); } diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index 2bf3c798..f701f046 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -1246,16 +1246,16 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co if ( !filename.isEmpty() ) { TQFileInfo fi( filename ); - if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.tqfind( ";pro" ) != -1 ) ) { + if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { addRecentlyOpened( filename, recentlyProjects ); openProject( filename ); - } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.tqfind( ";ui" ) != -1 ) ) { + } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { if ( !inProject ) setCurrentProject( eProject ); openFormWindow( filename ); addRecentlyOpened( filename, recentlyFiles ); - } else if ( !extension.isEmpty() && extension.tqfind( ";" + fi.extension( FALSE ) ) != -1 || - additionalSources.tqfind( fi.extension( FALSE ) ) != additionalSources.end() ) { + } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 || + additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); if ( !sf ) sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); @@ -1263,7 +1263,7 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co } else if ( extension.isEmpty() ) { TQString filter; for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { - if ( (*it2).tqcontains( "." + fi.extension( FALSE ), FALSE ) ) { + if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { filter = *it2; break; } @@ -1986,7 +1986,7 @@ void MainWindow::searchIncremetalFind() !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; - ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->tqfind( incrementalSearch->text(), + ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), FALSE, FALSE, TRUE, FALSE ); } @@ -1996,7 +1996,7 @@ void MainWindow::searchIncremetalFindNext() !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; - ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->tqfind( incrementalSearch->text(), + ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), FALSE, FALSE, TRUE, TRUE ); } diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp index e2098b5a..65b55522 100644 --- a/kdevdesigner/designer/menubareditor.cpp +++ b/kdevdesigner/designer/menubareditor.cpp @@ -273,7 +273,7 @@ void MenuBarEditor::removeItem( MenuBarEditorItem * item ) int MenuBarEditor::findItem( MenuBarEditorItem * item ) { - return itemList.tqfindRef( item ); + return itemList.findRef( item ); } int MenuBarEditor::findItem( PopupMenuEditor * menu ) @@ -314,7 +314,7 @@ int MenuBarEditor::findItem( TQPoint & pos ) r = TQRect( x, y, s.width(), s.height() ); - if ( r.tqcontains( pos ) ) + if ( r.contains( pos ) ) return itemList.at(); addItemSizeToCoords( i, x, y, w ); @@ -334,7 +334,7 @@ int MenuBarEditor::findItem( TQPoint & pos ) r = TQRect( x, y, s.width(), s.height() ); - if ( r.tqcontains( pos ) ) + if ( r.contains( pos ) ) return itemList.count(); return itemList.count() + 1; @@ -415,8 +415,8 @@ void MenuBarEditor::exchange( int a, int b ) ia == &addItem || ia == &addSeparator || ib == &addItem || ib == &addSeparator ) return; // do nothing - itemList.tqreplace( b, ia ); - itemList.tqreplace( a, ib ); + itemList.replace( b, ia ); + itemList.replace( a, ib ); } void MenuBarEditor::showLineEdit( int index ) @@ -646,7 +646,7 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) // If the item is dropped in the same list, // we will have two instances of the same pointer // in the list. - itemList.tqfind( draggedItem ); + itemList.find( draggedItem ); TQLNode * node = itemList.currentNode(); dropConfirmed = FALSE; d->dragCopy(); // dragevents and stuff happens @@ -1004,7 +1004,7 @@ void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos ) hideItem(); Command * cmd = 0; - int iidx = itemList.tqfindRef( i ); + int iidx = itemList.findRef( i ); if ( iidx != -1 ) { // internal dnd cmd = new MoveMenuCommand( i18n( "Item Dragged" ), formWnd, this, iidx, idx ); item( iidx )->setVisible( TRUE ); diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 72c2fa2f..5f8ce367 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -126,7 +126,7 @@ void MetaDataBase::addEntry( TQObject *o ) if ( !o ) return; setupDataBase(); - if ( db->tqfind( o ) ) + if ( db->find( o ) ) return; MetaDataBaseRecord *r = new MetaDataBaseRecord; r->object = o; @@ -149,7 +149,7 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo ( (PropertyObject*)o )->mdPropertyChanged( property, changed ); return; } - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -157,10 +157,10 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo } if ( changed ) { - if ( r->changedProperties.tqfindIndex( property ) == -1 ) + if ( r->changedProperties.findIndex( property ) == -1 ) r->changedProperties.append( property ); } else { - if ( r->changedProperties.tqfindIndex( property ) != -1 ) + if ( r->changedProperties.findIndex( property ) != -1 ) r->changedProperties.remove( property ); } @@ -188,20 +188,20 @@ bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) setupDataBase(); if ( o->isA( "PropertyObject" ) ) return ( (PropertyObject*)o )->mdIsPropertyChanged( property ); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return FALSE; } - return r->changedProperties.tqfindIndex( property ) != -1; + return r->changedProperties.findIndex( property ) != -1; } TQStringList MetaDataBase::changedProperties( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -219,7 +219,7 @@ void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, co ( (PropertyObject*)o )->mdSetPropertyComment( property, comment ); return; } - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -234,14 +234,14 @@ TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) setupDataBase(); if ( o->isA( "PropertyObject" ) ) return ( (PropertyObject*)o )->mdPropertyComment( property ); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - return *r->propertyComments.tqfind( property ); + return *r->propertyComments.find( property ); } void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) @@ -251,7 +251,7 @@ void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const ( (PropertyObject*)o )->mdSetFakeProperty( property, value ); return; } - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -265,13 +265,13 @@ TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) setupDataBase(); if ( o->isA( "PropertyObject" ) ) return ( (PropertyObject*)o )->mdFakeProperty( property ); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQVariant(); } - TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.tqfind( property ); + TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property ); if ( it != r->fakeProperties.end() ) return r->fakeProperties[property]; return WidgetFactory::defaultValue( o, property ); @@ -281,7 +281,7 @@ TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -295,7 +295,7 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -323,7 +323,7 @@ int MetaDataBase::spacing( TQObject *o ) setupDataBase(); if ( ::tqqt_cast<TQMainWindow*>(o) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -338,7 +338,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -380,7 +380,7 @@ int MetaDataBase::margin( TQObject *o ) setupDataBase(); if ( ::tqqt_cast<TQMainWindow*>(o) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -394,7 +394,7 @@ void MetaDataBase::setResizeMode( TQObject *o, const TQString &mode ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -411,7 +411,7 @@ TQString MetaDataBase::resizeMode( TQObject *o ) setupDataBase(); if ( ::tqqt_cast<TQMainWindow*>(o) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -424,7 +424,7 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString TQObject *receiver, const TQCString &slot, bool addCode ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -458,7 +458,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr TQObject *receiver, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -487,7 +487,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInterface::Connection> &conns ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -505,8 +505,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte cit != conns.end(); ++cit ) { // #### get the correct sender object out of Bla.Blub.sender TQString senderName = (*cit).sender; - if ( senderName.tqfind( '.' ) != -1 ) - senderName = senderName.mid( senderName.tqfindRev( '.' ) + 1 ); + if ( senderName.find( '.' ) != -1 ) + senderName = senderName.mid( senderName.findRev( '.' ) + 1 ); TQObject *sender = 0; if ( formfile->formWindow() ) sender = formfile->formWindow()->child( senderName ); @@ -535,7 +535,7 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString TQObject *receiver, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -557,7 +557,7 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -570,7 +570,7 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ TQObject *receiver ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -592,7 +592,7 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQObject *object ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -613,7 +613,7 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ void MetaDataBase::doConnections( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -656,8 +656,8 @@ void MetaDataBase::doConnections( TQObject *o ) TQStrList slotList = receiver->tqmetaObject()->slotNames( TRUE ); // avoid warnings - if ( signalList.tqfind( conn.signal ) == -1 || - slotList.tqfind( conn.slot ) == -1 ) + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) continue; TQObject::connect( sender, s, receiver, s2 ); @@ -667,7 +667,7 @@ void MetaDataBase::doConnections( TQObject *o ) bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -676,13 +676,13 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( !onlyCustom ) { TQStrList slotList = o->tqmetaObject()->slotNames( TRUE ); - if ( slotList.tqfind( slot ) != -1 ) + if ( slotList.find( slot ) != -1 ) return TRUE; if ( ::tqqt_cast<FormWindow*>(o) ) { o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); slotList = o->tqmetaObject()->slotNames( TRUE ); - if ( slotList.tqfind( slot ) != -1 ) + if ( slotList.find( slot ) != -1 ) return TRUE; } @@ -711,7 +711,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -732,7 +732,7 @@ void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQ const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -746,7 +746,7 @@ void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQ f.type = type; f.language = language; f.returnType = returnType; - TQValueList<MetaDataBase::Function>::Iterator it = r->functionList.tqfind( f ); + TQValueList<MetaDataBase::Function>::Iterator it = r->functionList.find( f ); if ( it != r->functionList.end() ) r->functionList.remove( it ); r->functionList.append( f ); @@ -756,7 +756,7 @@ void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQ void MetaDataBase::setFunctionList( TQObject *o, const TQValueList<Function> &functionList ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -770,7 +770,7 @@ void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -794,7 +794,7 @@ void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const void MetaDataBase::removeFunction( TQObject *o, const TQString &function ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -812,7 +812,7 @@ void MetaDataBase::removeFunction( TQObject *o, const TQString &function ) TQValueList<MetaDataBase::Function> MetaDataBase::functionList( TQObject *o, bool onlyFunctions ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -831,7 +831,7 @@ TQValueList<MetaDataBase::Function> MetaDataBase::functionList( TQObject *o, boo TQValueList<MetaDataBase::Function> MetaDataBase::slotList( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -849,7 +849,7 @@ void MetaDataBase::changeFunction( TQObject *o, const TQString &function, const const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -873,7 +873,7 @@ void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldNam const TQString &returnType ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -897,7 +897,7 @@ void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldNam bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onlyCustom ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -906,13 +906,13 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl if ( !onlyCustom ) { TQStrList functionList = o->tqmetaObject()->slotNames( TRUE ); - if ( functionList.tqfind( function ) != -1 ) + if ( functionList.find( function ) != -1 ) return TRUE; if ( ::tqqt_cast<FormWindow*>(o) ) { o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); functionList = o->tqmetaObject()->slotNames( TRUE ); - if ( functionList.tqfind( function ) != -1 ) + if ( functionList.find( function ) != -1 ) return TRUE; } @@ -941,7 +941,7 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1034,7 +1034,7 @@ bool MetaDataBase::hasCustomWidget( const TQString &className ) void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*) w ); + MetaDataBaseRecord *r = db->find( (void*) w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); @@ -1047,7 +1047,7 @@ void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*) w ); + MetaDataBaseRecord *r = db->find( (void*) w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); @@ -1060,7 +1060,7 @@ TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1073,7 +1073,7 @@ void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs ) TQValueList<MetaDataBase::Include> MetaDataBase::includes( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1086,7 +1086,7 @@ TQValueList<MetaDataBase::Include> MetaDataBase::includes( TQObject *o ) void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1099,7 +1099,7 @@ void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) TQStringList MetaDataBase::forwards( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1112,7 +1112,7 @@ TQStringList MetaDataBase::forwards( TQObject *o ) void MetaDataBase::setVariables( TQObject *o, const TQValueList<Variable> &vars ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1125,7 +1125,7 @@ void MetaDataBase::setVariables( TQObject *o, const TQValueList<Variable> &vars void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQString &access ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1140,7 +1140,7 @@ void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQStrin void MetaDataBase::removeVariable( TQObject *o, const TQString &name ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1158,7 +1158,7 @@ void MetaDataBase::removeVariable( TQObject *o, const TQString &name ) TQValueList<MetaDataBase::Variable> MetaDataBase::variables( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1171,7 +1171,7 @@ TQValueList<MetaDataBase::Variable> MetaDataBase::variables( TQObject *o ) bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1188,7 +1188,7 @@ bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) TQString MetaDataBase::extractVariableName( const TQString &name ) { - TQString n = name.right( name.length() - name.tqfindRev( ' ' ) - 1 ); + TQString n = name.right( name.length() - name.findRev( ' ' ) - 1 ); if ( n[ 0 ] == '*' || n[ 0 ] == '&' ) n[ 0 ] = ' '; if ( n[ (int)n.length() - 1 ] == ';' ) @@ -1199,7 +1199,7 @@ TQString MetaDataBase::extractVariableName( const TQString &name ) void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1213,10 +1213,10 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) bool hasSemicolon = s.endsWith( ";" ); if ( hasSemicolon ) s = s.left( s.length() - 1 ); - int p = s.tqfind( '(' ); + int p = s.find( '(' ); if ( p < 0 ) p = s.length(); - int sp = s.tqfind( ' ' ); + int sp = s.find( ' ' ); if ( sp >= 0 && sp < p ) { s = s.mid( sp+1 ); p -= sp + 1; @@ -1232,7 +1232,7 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) TQStringList MetaDataBase::signalList( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1245,7 +1245,7 @@ TQStringList MetaDataBase::signalList( TQObject *o ) void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1258,7 +1258,7 @@ void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1304,7 +1304,7 @@ void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) ( (PropertyObject*)w )->mdSetCursor( c ); return; } - MetaDataBaseRecord *r = db->tqfind( (void*)w ); + MetaDataBaseRecord *r = db->find( (void*)w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); @@ -1319,7 +1319,7 @@ TQCursor MetaDataBase::cursor( TQWidget *w ) setupDataBase(); if ( w->isA( "PropertyObject" ) ) return ( (PropertyObject*)w )->mdCursor(); - MetaDataBaseRecord *r = db->tqfind( (void*)w ); + MetaDataBaseRecord *r = db->find( (void*)w ); if ( !r ) { w->unsetCursor(); return w->cursor(); @@ -1355,7 +1355,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const { TQStrList sigList = TQWidget::tqstaticMetaObject()->signalNames( TRUE ); - if ( sigList.tqfind( signal ) != -1 ) + if ( sigList.find( signal ) != -1 ) return TRUE; for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { if ( normalizeFunction( *it ) == normalizeFunction( signal ) ) @@ -1367,7 +1367,7 @@ bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const { TQStrList slotList = TQWidget::tqstaticMetaObject()->slotNames( TRUE ); - if ( slotList.tqfind( normalizeFunction( slot ) ) != -1 ) + if ( slotList.find( normalizeFunction( slot ) ) != -1 ) return TRUE; for ( TQValueList<MetaDataBase::Function>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { @@ -1380,7 +1380,7 @@ bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const { TQStrList propList = TQWidget::tqstaticMetaObject()->propertyNames( TRUE ); - if ( propList.tqfind( prop ) != -1 ) + if ( propList.find( prop ) != -1 ) return TRUE; for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { @@ -1395,7 +1395,7 @@ void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &a if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1411,14 +1411,14 @@ TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) if ( !o ) return TQString(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - return *r->pixmapArguments.tqfind( pixmap ); + return *r->pixmapArguments.find( pixmap ); } void MetaDataBase::clearPixmapArguments( TQObject *o ) @@ -1426,7 +1426,7 @@ void MetaDataBase::clearPixmapArguments( TQObject *o ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1446,7 +1446,7 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) ( (PropertyObject*)o )->mdSetPixmapKey( pixmap, arg ); return; } - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1464,21 +1464,21 @@ TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) setupDataBase(); if ( o->isA( "PropertyObject" ) ) return ( (PropertyObject*)o )->mdPixmapKey( pixmap ); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - TQString s = *r->pixmapKeys.tqfind( pixmap ); + TQString s = *r->pixmapKeys.find( pixmap ); if ( !s.isNull() ) return s; if ( !o->isWidgetType() ) return s; TQWidget *w = (TQWidget*)o; if ( w->icon() ) - return *r->pixmapKeys.tqfind( w->icon()->serialNumber() ); + return *r->pixmapKeys.find( w->icon()->serialNumber() ); return s; } @@ -1487,7 +1487,7 @@ void MetaDataBase::clearPixmapKeys( TQObject *o ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1504,7 +1504,7 @@ void MetaDataBase::setColumnFields( TQObject *o, const TQMap<TQString, TQString> if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1519,7 +1519,7 @@ TQMap<TQString, TQString> MetaDataBase::columnFields( TQObject *o ) if ( !o ) return TQMap<TQString, TQString>(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1536,7 +1536,7 @@ void MetaDataBase::setEditor( const TQStringList &langs ) bool MetaDataBase::hasEditor( const TQString &lang ) { - return editorLangList.tqfind( lang ) != editorLangList.end(); + return editorLangList.find( lang ) != editorLangList.end(); } void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) @@ -1586,7 +1586,7 @@ void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList<uint> &l ) if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1599,8 +1599,8 @@ void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList<uint> &l ) while ( it != r->breakPointConditions.end() ) { int line = it.key(); ++it; - if ( r->breakPoints.tqfind( line ) == r->breakPoints.end() ) - r->breakPointConditions.remove( r->breakPointConditions.tqfind( line ) ); + if ( r->breakPoints.find( line ) == r->breakPoints.end() ) + r->breakPointConditions.remove( r->breakPointConditions.find( line ) ); } } @@ -1609,7 +1609,7 @@ TQValueList<uint> MetaDataBase::breakPoints( TQObject *o ) if ( !o ) return TQValueList<uint>(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1624,13 +1624,13 @@ void MetaDataBase::setBreakPointCondition( TQObject *o, int line, const TQString if ( !o ) return; setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return; } - r->breakPointConditions.tqreplace( line, condition ); + r->breakPointConditions.replace( line, condition ); } TQString MetaDataBase::breakPointCondition( TQObject *o, int line ) @@ -1638,13 +1638,13 @@ TQString MetaDataBase::breakPointCondition( TQObject *o, int line ) if ( !o ) return TQString(); setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); return TQString(); } - TQMap<int, TQString>::Iterator it = r->breakPointConditions.tqfind( line ); + TQMap<int, TQString>::Iterator it = r->breakPointConditions.find( line ); if ( it == r->breakPointConditions.end() ) return TQString(); return *it; @@ -1659,7 +1659,7 @@ void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) ( (PropertyObject*)o )->mdSetExportMacro( macro ); return; } - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1676,7 +1676,7 @@ TQString MetaDataBase::exportMacro( TQObject *o ) setupDataBase(); if ( o->isA( "PropertyObject" ) ) return ( (PropertyObject*)o )->mdExportMacro(); - MetaDataBaseRecord *r = db->tqfind( (void*)o ); + MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -1688,5 +1688,5 @@ TQString MetaDataBase::exportMacro( TQObject *o ) bool MetaDataBase::hasObject( TQObject *o ) { - return !!db->tqfind( o ); + return !!db->find( o ); } diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp index 75eb2acd..20f94f86 100644 --- a/kdevdesigner/designer/multilineeditorimpl.cpp +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -232,7 +232,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget mlined->setReadOnly( TRUE ); const TQMetaProperty *wordWrap = mlined->tqmetaObject()->property( - mlined->tqmetaObject()->tqfindProperty( "wordWrap", TRUE ), TRUE ); + mlined->tqmetaObject()->findProperty( "wordWrap", TRUE ), TRUE ); oldWrapMode = 0; oldWrapString = "NoWrap"; if ( wordWrap ) { @@ -321,7 +321,7 @@ void MultiLineEditor::insertTags( const TQString &tag ) { int pfrom, pto, ifrom, ito; TQString tagend( tag.simplifyWhiteSpace() ); - tagend.remove( tagend.tqfind( ' ', 0 ), tagend.length() ); + tagend.remove( tagend.find( ' ', 0 ), tagend.length() ); if ( textEdit->hasSelectedText() ) { textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); TQString buf = textEdit->selectedText(); diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp index 6fae9015..0c90c056 100644 --- a/kdevdesigner/designer/newformimpl.cpp +++ b/kdevdesigner/designer/newformimpl.cpp @@ -138,12 +138,12 @@ static void unifyFormName( FormWindow *fw, TQWorkspace *qworkspace ) lst << w->name(); } - if ( lst.tqfindIndex( fw->name() ) == -1 ) + if ( lst.findIndex( fw->name() ) == -1 ) return; TQString origName = fw->name(); TQString n = origName; int i = 1; - while ( lst.tqfindIndex( n ) != -1 ) { + while ( lst.findIndex( n ) != -1 ) { n = origName + TQString::number( i++ ); } fw->setName( n ); @@ -306,7 +306,7 @@ void NewForm::insertTemplates( TQIconView *tView, if ( !fi->isFile() || fi->extension() != "ui" ) continue; TQString name = fi->baseName(); - name = name.tqreplace( '_', ' ' ); + name = name.replace( '_', ' ' ); CustomFormItem *ci = new CustomFormItem( tView, name ); allItems.append( ci ); ci->setDragEnabled( FALSE ); diff --git a/kdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp index ec7418db..28f744b0 100644 --- a/kdevdesigner/designer/outputwindow.cpp +++ b/kdevdesigner/designer/outputwindow.cpp @@ -182,7 +182,7 @@ ErrorItem::ErrorItem( TQListView *tqparent, TQListViewItem *after, const TQStrin setMultiLinesEnabled( TRUE ); TQString m( message ); type = m.startsWith( "Warning: " ) ? Warning : Error; - m = m.mid( m.tqfind( ':' ) + 1 ); + m = m.mid( m.find( ':' ) + 1 ); setText( 0, type == Error ? "Error" : "Warning" ); setText( 1, m ); setText( 2, TQString::number( line ) ); diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp index 4d6ad2ed..6992bc77 100644 --- a/kdevdesigner/designer/pixmapchooser.cpp +++ b/kdevdesigner/designer/pixmapchooser.cpp @@ -223,7 +223,7 @@ ImageIconProvider::~ImageIconProvider() const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) { TQString ext = fi.extension().upper(); - if ( fmts.tqcontains( ext ) ) { + if ( fmts.contains( ext ) ) { return &imagepm; } else { return TQFileIconProvider::pixmap( fi ); diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h index 1865f72f..c999d539 100644 --- a/kdevdesigner/designer/pixmapcollectioneditor.ui.h +++ b/kdevdesigner/designer/pixmapcollectioneditor.ui.h @@ -61,7 +61,7 @@ void PixmapCollectionEditor::addPixmap() } updateView(); - TQIconViewItem *item = viewPixmaps->tqfindItem( lastName ); + TQIconViewItem *item = viewPixmaps->findItem( lastName ); if ( item ) { viewPixmaps->setCurrentItem( item ); viewPixmaps->ensureItemVisible( item ); @@ -124,7 +124,7 @@ void PixmapCollectionEditor::setChooserMode( bool c ) void PixmapCollectionEditor::setCurrentItem( const TQString & name ) { - TQIconViewItem *i = viewPixmaps->tqfindItem( name ); + TQIconViewItem *i = viewPixmaps->findItem( name ); if ( i ) { viewPixmaps->setCurrentItem( i ); currentChanged( i ); diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index c5dcd8bf..78fe0aca 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -228,7 +228,7 @@ bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) TQChildEvent * ce = ( TQChildEvent * ) event; TQObject * c = TQT_TQOBJECT(ce->child()); TQAction * action = ::tqqt_cast<TQAction*>( c ); - if ( s->tqfind( action ) != -1 ) // avoid duplicates + if ( s->find( action ) != -1 ) // avoid duplicates return FALSE; TQActionGroup * actionGroup = ::tqqt_cast<TQActionGroup*>( c ); if ( actionGroup ) @@ -242,7 +242,7 @@ bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) void PopupMenuEditorItem::selfDestruct() { hideMenu(); - int i = m->tqfind( s ); + int i = m->find( s ); if ( i != -1 && i < m->count() ) m->remove( i ); // remove this item a = 0; // the selfDestruct call was caused by the deletion of the action @@ -374,7 +374,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) delete l; } -int PopupMenuEditor::tqfind( const TQAction * action ) +int PopupMenuEditor::find( const TQAction * action ) { PopupMenuEditorItem * i = itemList.first(); while ( i ) { @@ -385,7 +385,7 @@ int PopupMenuEditor::tqfind( const TQAction * action ) return -1; } -int PopupMenuEditor::tqfind( PopupMenuEditor * menu ) +int PopupMenuEditor::find( PopupMenuEditor * menu ) { PopupMenuEditorItem * i = itemList.first(); while ( i ) { @@ -414,8 +414,8 @@ void PopupMenuEditor::exchange( int a, int b ) ia == &addItem || ia == &addSeparator || ib == &addItem || ib == &addSeparator ) return; // do nothing - itemList.tqreplace( b, ia ); - itemList.tqreplace( a, ib ); + itemList.replace( b, ia ); + itemList.replace( a, ib ); } void PopupMenuEditor::cut( int index ) @@ -786,7 +786,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) // If the item is dropped in the same list, // we will have two instances of the same pointer // in the list. We use node instead. - int idx = itemList.tqfind( draggedItem ); + int idx = itemList.find( draggedItem ); TQLNode * node = itemList.currentNode(); d->dragCopy(); // dragevents and stuff happens @@ -1229,7 +1229,7 @@ void PopupMenuEditor::dropInPlace( PopupMenuEditorItem * i, int y ) idx++; n = itemList.next(); } - int same = itemList.tqfindRef( i ); + int same = itemList.findRef( i ); AddActionToPopupCommand * cmd = new AddActionToPopupCommand( i18n( "Drop Item" ), formWnd, this, i, idx ); formWnd->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -1410,7 +1410,7 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e ) // new item was created TQAction * a = formWnd->mainWindow()->actioneditor()->newActionEx(); TQString actionText = lineEdit->text(); - actionText.tqreplace("&&", "&"); + actionText.replace("&&", "&"); TQString menuText = lineEdit->text(); a->setText( actionText ); a->setMenuText( menuText ); @@ -1451,7 +1451,7 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item ) TQWidget *e = parentEditor(); PopupMenuEditor *p = ::tqqt_cast<PopupMenuEditor*>(e); if ( p ) { - int idx = p->tqfind( item->m ); + int idx = p->find( item->m ); PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 ); s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) ); } else { diff --git a/kdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h index e9e4e1c2..70d7e085 100644 --- a/kdevdesigner/designer/popupmenueditor.h +++ b/kdevdesigner/designer/popupmenueditor.h @@ -117,8 +117,8 @@ public: void insert( PopupMenuEditorItem * item, int index = -1 ); void insert( TQAction * action, int index = -1 ); void insert( TQActionGroup * actionGroup, int index = -1 ); - int tqfind( const TQAction * action ); - int tqfind( PopupMenuEditor * menu ); + int find( const TQAction * action ); + int find( PopupMenuEditor * menu ); int count(); PopupMenuEditorItem * at( int index ); PopupMenuEditorItem * at( TQPoint pos ) { return itemAt( pos.y() ); } @@ -153,7 +153,7 @@ public slots: void paste() { paste( currentIndex ); } void remove( int index ); - void remove( TQAction * a ) { remove( tqfind( a ) ); } + void remove( TQAction * a ) { remove( find( a ) ); } void resizeToContents(); void showSubMenu(); diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp index 61143c95..d96bd4dd 100644 --- a/kdevdesigner/designer/project.cpp +++ b/kdevdesigner/designer/project.cpp @@ -108,12 +108,12 @@ bool DatabaseConnection::open( bool suppressDialog ) #ifndef TQT_NO_SQL // register our name, if nec if ( nm == "(default)" ) { - if ( !TQSqlDatabase::tqcontains() ) // default doesn't exists? + if ( !TQSqlDatabase::contains() ) // default doesn't exists? conn = TQSqlDatabase::addDatabase( drv ); else conn = TQSqlDatabase::database(); } else { - if ( !TQSqlDatabase::tqcontains( nm ) ) + if ( !TQSqlDatabase::contains( nm ) ) conn = TQSqlDatabase::addDatabase( drv, nm ); else conn = TQSqlDatabase::database( nm ); @@ -285,8 +285,8 @@ void Project::setFileName( const TQString &fn, bool doClear ) } - if ( proName.tqcontains( '.' ) ) - proName = proName.left( proName.tqfind( '.' ) ); + if ( proName.contains( '.' ) ) + proName = proName.left( proName.find( '.' ) ); if ( !doClear ) return; @@ -424,7 +424,7 @@ void Project::parse() TQStringList::ConstIterator it; - int i = contents.tqfind( "LANGUAGE" ); + int i = contents.find( "LANGUAGE" ); if ( i != -1 ) { lang = ""; is_cpp = FALSE; @@ -433,7 +433,7 @@ void Project::parse() is_cpp = lang == "C++"; } - i = contents.tqfind( "DBFILE" ); + i = contents.find( "DBFILE" ); if ( i != -1 ) { dbFile = ""; TQString part = contents.mid( i + TQString( "DBFILE" ).length() ); @@ -449,7 +449,7 @@ void Project::parse() } - i = contents.tqfind( "TEMPLATE" ); + i = contents.find( "TEMPLATE" ); if ( i != -1 ) { templ = ""; TQString part = contents.mid( i + TQString( "TEMPLATE" ).length() ); @@ -477,12 +477,12 @@ void Project::parse() updateCustomSettings(); for ( it = csList.begin(); it != csList.end(); ++it ) { - i = contents.tqfind( *it ); + i = contents.find( *it ); if ( i != -1 ) { TQString val = ""; TQString part = contents.mid( i + TQString( *it ).length() ); val = parse_part( part ); - customSettings.tqreplace( *it, val ); + customSettings.replace( *it, val ); } } @@ -511,7 +511,7 @@ void Project::clear() bool Project::removeSourceFile( SourceFile *sf ) { - if ( !sourcefiles.tqcontainsRef( sf ) ) + if ( !sourcefiles.containsRef( sf ) ) return FALSE; if ( !sf->close() ) return FALSE; @@ -569,10 +569,10 @@ TQString Project::makeRelative( const TQString &f ) static void remove_contents( TQString &contents, const TQString &s ) { - int i = contents.tqfind( s ); + int i = contents.find( s ); if ( i != -1 ) { int start = i; - int end = contents.tqfind( '\n', i ); + int end = contents.find( '\n', i ); if ( end == -1 ) end = contents.length() - 1; contents.remove( start, end - start + 1 ); @@ -581,7 +581,7 @@ static void remove_contents( TQString &contents, const TQString &s ) static void remove_multiline_contents( TQString &contents, const TQString &s, int *strt = 0 ) { - int i = contents.tqfind( s ); + int i = contents.find( s ); if ( strt ) *strt = i; int start = i; @@ -704,7 +704,7 @@ void Project::save( bool onlyProjectFile ) TQString key = iface->projectKeyForExtension( TQFileInfo( f->fileName() ).extension() ); TQStringList lst = sourceToKey[ key ]; lst << makeRelative( f->fileName() ); - sourceToKey.tqreplace( key, lst ); + sourceToKey.replace( key, lst ); } for ( TQMap<TQString, TQStringList>::Iterator skit = sourceToKey.begin(); @@ -751,7 +751,7 @@ void Project::save( bool onlyProjectFile ) // custom settings for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) { - TQString val = *customSettings.tqfind( *it ); + TQString val = *customSettings.find( *it ); if ( !val.isEmpty() ) contents += *it + "\t= " + val + "\n"; } @@ -1105,7 +1105,7 @@ void Project::setCustomSetting( const TQString &key, const TQString &value ) TQString Project::customSetting( const TQString &key ) const { - return *customSettings.tqfind( key ); + return *customSettings.find( key ); } void Project::updateCustomSettings() @@ -1170,23 +1170,23 @@ void Project::setIncludePath( const TQString &platform, const TQString &path ) { if ( inclPath[platform] == path ) return; - inclPath.tqreplace( platform, path ); + inclPath.replace( platform, path ); modified = TRUE; } void Project::setLibs( const TQString &platform, const TQString &path ) { - lbs.tqreplace( platform, path ); + lbs.replace( platform, path ); } void Project::setDefines( const TQString &platform, const TQString &path ) { - defs.tqreplace( platform, path ); + defs.replace( platform, path ); } void Project::setConfig( const TQString &platform, const TQString &config ) { - cfg.tqreplace( platform, config ); + cfg.replace( platform, config ); } TQString Project::config( const TQString &platform ) const @@ -1233,7 +1233,7 @@ void Project::readPlatformSettings( const TQString &contents, TQString key = platforms[ i ]; if ( key.isEmpty() ) key = "(all)"; - res.tqreplace( key, s ); + res.replace( key, s ); } } @@ -1265,7 +1265,7 @@ void Project::writePlatformSettings( TQString &contents, const TQString &setting TQString key = platforms[ i ]; if ( key.isEmpty() ) key = "(all)"; - TQMap<TQString, TQString>::ConstIterator it = input.tqfind( key ); + TQMap<TQString, TQString>::ConstIterator it = input.find( key ); if ( it == input.end() || (*it).isEmpty() ) continue; contents += p + setting + "\t+= " + *it + "\n"; @@ -1281,7 +1281,7 @@ void Project::addFormFile( FormFile *ff ) bool Project::removeFormFile( FormFile *ff ) { - if ( !formfiles.tqcontainsRef( ff ) ) + if ( !formfiles.containsRef( ff ) ) return FALSE; if ( !ff->close() ) return FALSE; @@ -1352,7 +1352,7 @@ TQObjectList Project::objects() const FormFile *Project::fakeFormFileFor( TQObject *o ) const { - return fakeFormFiles.tqfind( (void*)o ); + return fakeFormFiles.find( (void*)o ); } TQObject *Project::objectForFakeForm( FormWindow *fw ) const @@ -1411,14 +1411,14 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func return; iface->functions( f->text(), &funcs ); TQString func = function; - int i = func.tqfind( '(' ); + int i = func.find( '(' ); if ( i != -1 ) func = func.left( i ); bool found = FALSE; for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin(); it != funcs.end(); ++it ) { - if ( (*it).name.left( (*it).name.tqfind( '(' ) ) == func ) { + if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) { found = TRUE; break; } @@ -1463,7 +1463,7 @@ TQString Project::qualifiedName( TQObject *o ) TQObject *p = o->tqparent(); while ( p ) { name.prepend( TQString( p->name() ) + "." ); - if ( objs.tqfindRef( p ) != -1 ) + if ( objs.findRef( p ) != -1 ) break; p = p->tqparent(); } @@ -1547,7 +1547,7 @@ TQString Project::locationOfObject( TQObject *o ) return TQString(); } - TQString s = makeRelative( *qwf_forms->tqfind( (TQWidget*)o ) ); + TQString s = makeRelative( *qwf_forms->find( (TQWidget*)o ) ); s += " [Source]"; return s; } diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index 01ac4295..6535ef7f 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -564,7 +564,7 @@ void PropertyItem::setText( int col, const TQString &t ) { TQString txt( t ); if ( col == 1 ) - txt = txt.tqreplace( "\n", " " ); + txt = txt.replace( "\n", " " ); TQListViewItem::setText( col, txt ); } @@ -2748,7 +2748,7 @@ void EnumBox::mousePressEvent( TQMouseEvent *e ) arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); - if ( arrowRect.tqcontains( e->pos() ) ) { + if ( arrowRect.contains( e->pos() ) ) { arrowDown = TRUE; tqrepaint( FALSE ); } @@ -2847,7 +2847,7 @@ void PropertyEnumItem::setValue() enumString += "|" + (*it).key; } if ( !enumString.isEmpty() ) - enumString.tqreplace( 0, 1, "" ); + enumString.replace( 0, 1, "" ); box->setText( enumString ); setText( 1, enumString ); @@ -2870,7 +2870,7 @@ void PropertyEnumItem::setCurrentValues( TQStrList lst ) } } if ( !enumString.isEmpty() ) - enumString.tqreplace( 0, 1, "" ); + enumString.replace( 0, 1, "" ); box->setText( enumString ); setText( 1, enumString ); } @@ -3052,10 +3052,10 @@ void PropertyList::setupProperties() for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { const TQMetaProperty* p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( it.current(), allProperties), allProperties ); + property( editor->widget()->tqmetaObject()->findProperty( it.current(), allProperties), allProperties ); if ( !p ) continue; - if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) ) + if ( unique.contains( TQString::tqfromLatin1( it.current() ) ) ) continue; if ( ::tqqt_cast<QDesignerToolBar*>(editor->widget()) || ::tqqt_cast<MenuBarEditor*>(editor->widget()) ) { @@ -3226,7 +3226,7 @@ void PropertyList::setupProperties() } } if ( item && !p->isSetType() ) { - if ( valueSet.tqfindIndex( item->name() ) == -1 ) { + if ( valueSet.findIndex( item->name() ) == -1 ) { setPropertyValue( item ); valueSet << item->name(); } @@ -3339,7 +3339,7 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( unique.tqcontains( TQString( (*it).property ) ) ) + if ( unique.contains( TQString( (*it).property ) ) ) continue; unique.insert( TQString( (*it).property ), TRUE ); addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); @@ -3359,7 +3359,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, l << ""; while ( it.current() ) { if ( editor->formWindow()->canBeBuddy( it.current() ) ) { - if ( l.tqfind( it.current()->name() ) == l.end() ) + if ( l.find( it.current()->name() ) == l.end() ) l << it.current()->name(); } ++it; @@ -3679,9 +3679,9 @@ static void clearAlignList( TQStrList &l ) { if ( l.count() == 1 ) return; - if ( l.tqfind( "AlignAuto" ) != -1 ) + if ( l.find( "AlignAuto" ) != -1 ) l.remove( "AlignAuto" ); - if ( l.tqfind( "WordBreak" ) != -1 ) + if ( l.find( "WordBreak" ) != -1 ) l.remove( "WordBreak" ); } @@ -3693,12 +3693,12 @@ void PropertyList::setPropertyValue( PropertyItem *i ) { const TQMetaProperty *p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( i->name(), TRUE), TRUE ); + property( editor->widget()->tqmetaObject()->findProperty( i->name(), TRUE), TRUE ); if ( !p ) { if ( i->name() == "hAlign" ) { int align = editor->widget()->property( "tqalignment" ).toInt(); p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", TRUE ), TRUE ); + property( editor->widget()->tqmetaObject()->findProperty( "tqalignment", TRUE ), TRUE ); align &= ~AlignVertical_Mask; TQStrList l = p->valueToKeys( align ); clearAlignList( l ); @@ -3706,7 +3706,7 @@ void PropertyList::setPropertyValue( PropertyItem *i ) } else if ( i->name() == "vAlign" ) { int align = editor->widget()->property( "tqalignment" ).toInt(); p = editor->widget()->tqmetaObject()-> - property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", TRUE ), TRUE ); + property( editor->widget()->tqmetaObject()->findProperty( "tqalignment", TRUE ), TRUE ); align &= ~AlignHorizontal_Mask; ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); } else if ( i->name() == "wordwrap" ) { @@ -3870,7 +3870,7 @@ TQString PropertyList::whatsThisText( TQListViewItem *i ) TQString s; s = TQString( mo->className() ) + "::" + prop; TQMap<TQString, TQString>::Iterator it; - if ( ( it = propertyDocs.tqfind( s ) ) != propertyDocs.end() ) { + if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { return *it; } mo = mo->tqsuperClass(); @@ -3929,15 +3929,15 @@ EventList::EventList( TQWidget *tqparent, FormWindow *fw, PropertyEditor *e ) TQString clean_arguments( const TQString &s ) { TQString slot = s; - TQString arg = slot.mid( slot.tqfind( '(' ) + 1 ); - arg = arg.left( arg.tqfindRev( ')' ) ); + TQString arg = slot.mid( slot.find( '(' ) + 1 ); + arg = arg.left( arg.findRev( ')' ) ); TQStringList args = TQStringList::split( ',', arg ); - slot = slot.left( slot.tqfind( '(' ) + 1 ); + slot = slot.left( slot.find( '(' ) + 1 ); int num = 0; for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) { TQString a = *it; int i; - if ( ( i =a.tqfind( ':' ) ) == -1 ) + if ( ( i =a.find( ':' ) ) == -1 ) slot += a.simplifyWhiteSpace(); else slot += a.mid( i + 1 ).simplifyWhiteSpace(); @@ -3996,7 +3996,7 @@ void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) TQString s; if ( !formWindow->project()->isCpp() ) { TQString s1 = i->text( 0 ); - int pt = s1.tqfind( "(" ); + int pt = s1.find( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); s = TQString( editor->widget()->name() ) + "_" + s1; @@ -4035,7 +4035,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) TQString s; if ( !formWindow->project()->isCpp() ) { TQString s1 = ( i->tqparent() ? i->tqparent() : i )->text( 0 ); - int pt = s1.tqfind( "(" ); + int pt = s1.find( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); s = TQString( editor->widget()->name() ) + "_" + s1; @@ -4090,9 +4090,9 @@ void EventList::renamed( TQListViewItem *i ) // #### we should look if the specified slot already // exists and if we can connect to this one TQString funcname = i->text( 0 ).latin1(); - if ( funcname.tqfind( '(' ) == -1 ) { // try to create a signature + if ( funcname.find( '(' ) == -1 ) { // try to create a signature TQString sig = i->tqparent()->text( 0 ); - sig = sig.mid( sig.tqfind( '(' ) + 1 ); + sig = sig.mid( sig.find( '(' ) + 1 ); sig.remove( (int)sig.length() - 1, 1 ); LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); if ( iface ) @@ -4110,7 +4110,7 @@ void EventList::renamed( TQListViewItem *i ) /* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public", "slot", formWindow->project()->language(), "void" ); editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).tqfind( "(" ) ), TRUE );*/ + editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/ cmd->execute(); cmd2->execute(); editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); @@ -4277,7 +4277,7 @@ TQString PropertyEditor::classOfCurrentProperty() const TQMetaObject *mo = o->tqmetaObject(); while ( mo ) { TQStrList props = mo->propertyNames( FALSE ); - if ( props.tqfind( curr.latin1() ) != -1 ) + if ( props.find( curr.latin1() ) != -1 ) return mo->className(); mo = mo->tqsuperClass(); } diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp index 6499c78d..0c7bd57d 100644 --- a/kdevdesigner/designer/qcompletionedit.cpp +++ b/kdevdesigner/designer/qcompletionedit.cpp @@ -180,7 +180,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) void QCompletionEdit::addCompletionEntry( const TQString &entry ) { - if ( compList.tqfind( entry ) == compList.end() ) { + if ( compList.find( entry ) == compList.end() ) { compList << entry; compList.sort(); } @@ -188,7 +188,7 @@ void QCompletionEdit::addCompletionEntry( const TQString &entry ) void QCompletionEdit::removeCompletionEntry( const TQString &entry ) { - TQStringList::Iterator it = compList.tqfind( entry ); + TQStringList::Iterator it = compList.find( entry ); if ( it != compList.end() ) compList.remove( it ); } diff --git a/kdevdesigner/designer/replacedialog.ui.h b/kdevdesigner/designer/replacedialog.ui.h index 3b43488d..63946525 100644 --- a/kdevdesigner/designer/replacedialog.ui.h +++ b/kdevdesigner/designer/replacedialog.ui.h @@ -44,7 +44,7 @@ void ReplaceDialog::doReplace() if ( !editor ) return; - if ( !editor->tqreplace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), + if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), FALSE ) ) checkBegin->setChecked( TRUE ); else @@ -56,7 +56,7 @@ void ReplaceDialog::doReplaceAll() if ( !editor ) return; - if ( !editor->tqreplace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), + if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), TRUE ) ) checkBegin->setChecked( TRUE ); else diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index e511f7f1..74ef9862 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -97,12 +97,12 @@ static TQString makeIndent( int indent ) static TQString entitize( const TQString &s, bool attribute = FALSE ) { TQString s2 = s; - s2 = s2.tqreplace( "&", "&" ); - s2 = s2.tqreplace( ">", ">" ); - s2 = s2.tqreplace( "<", "<" ); + s2 = s2.replace( "&", "&" ); + s2 = s2.replace( ">", ">" ); + s2 = s2.replace( "<", "<" ); if ( attribute ) { - s2 = s2.tqreplace( "\"", """ ); - s2 = s2.tqreplace( "'", "'" ); + s2 = s2.replace( "\"", """ ); + s2 = s2.replace( "'", "'" ); } return s2; } @@ -742,7 +742,7 @@ TQString Resource::copy() TQWidget *p = w->parentWidget(); bool save = TRUE; while ( p ) { - if ( tmp.tqfindRef( p ) != -1 ) { + if ( tmp.findRef( p ) != -1 ) { save = FALSE; break; } @@ -846,7 +846,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea includeHints << WidgetDatabase::includeFile( classID ); } - if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->tqfind( (TQWidget*)obj ) ) + if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) return; // we don't know anything about this thing TQString attributes; @@ -1214,7 +1214,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) if ( isDataTable && !columnFields.isEmpty() ) { ts << makeIndent( indent ) << "<property name=\"field\">" << endl; indent++; - ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.tqfind( l[ 0 ] ) ) << "</string>" << endl; + ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</property>" << endl; } @@ -1399,9 +1399,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { if ( ::tqqt_cast<Spacer*>(w) ) { - if ( !changed.tqcontains( "tqsizeHint" ) ) + if ( !changed.contains( "tqsizeHint" ) ) changed << "tqsizeHint"; - if ( !changed.tqcontains( "geometry" ) ) + if ( !changed.contains( "geometry" ) ) changed << "geometry"; } else { TQToolButton *tb = ::tqqt_cast<TQToolButton*>(w); @@ -1420,9 +1420,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) } if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - if ( changed.tqfindIndex( "geometry" ) == -1 ) + if ( changed.findIndex( "geometry" ) == -1 ) changed << "geometry"; - if ( changed.tqfindIndex( "caption" ) == -1 ) + if ( changed.findIndex( "caption" ) == -1 ) changed << "caption"; } @@ -1434,13 +1434,13 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) TQStrList lst = w->tqmetaObject()->propertyNames( !::tqqt_cast<Spacer*>(w) ); for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { - if ( changed.tqfind( TQString::tqfromLatin1( it.current() ) ) == changed.end() ) + if ( changed.find( TQString::tqfromLatin1( it.current() ) ) == changed.end() ) continue; - if ( saved.tqfind( TQString::tqfromLatin1( it.current() ) ) != saved.end() ) + if ( saved.find( TQString::tqfromLatin1( it.current() ) ) != saved.end() ) continue; saved << TQString::tqfromLatin1( it.current() ); const TQMetaProperty* p = w->tqmetaObject()-> - property( w->tqmetaObject()->tqfindProperty( it.current(), TRUE ), TRUE ); + property( w->tqmetaObject()->findProperty( it.current(), TRUE ), TRUE ); if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) continue; if ( ::tqqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 && @@ -1496,7 +1496,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, TRUE ), TRUE ); + const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( name, TRUE ), TRUE ); TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); TQString v; for ( uint i = 0; i < l.count(); ++i ) { @@ -1509,7 +1509,7 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, TRUE ), TRUE ); + const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( name, TRUE ), TRUE ); ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl; } @@ -1522,7 +1522,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant uint unum; double dob; TQString comment; - if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) || formwindow->actionList().tqfind( (TQAction*)w ) ) + if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) ) comment = MetaDataBase::propertyComment( w, name ); switch ( t ) { case TQVariant::String: @@ -2143,7 +2143,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL */ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) { - const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, TRUE ), TRUE ); + const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->findProperty( prop, TRUE ), TRUE ); if ( !::tqqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { @@ -2404,7 +2404,7 @@ static TQImage loadImageData( TQDomElement &n2 ) ba[2] = ( len & 0x0000ff00 ) >> 8; ba[3] = ( len & 0x000000ff ); TQByteArray baunzip = tqUncompress( ba, baSize ); - img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.tqfind('.')) ); + img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) ); } else { img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format ); } @@ -2451,9 +2451,9 @@ void Resource::saveConnections( TQTextStream &ts, int indent ) TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin(); for ( ; it != connections.end(); ++it ) { MetaDataBase::Connection conn = *it; - if ( ( knownNames.tqfindIndex( TQString( conn.sender->name() ) ) == -1 && + if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && qstrcmp( conn.sender->name(), "this" ) != 0 ) || - ( knownNames.tqfindIndex( TQString( conn.receiver->name() ) ) == -1 && + ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) continue; if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && @@ -2581,7 +2581,7 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets(); for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - if ( usedCustomWidgets.tqfindIndex( w->className ) == -1 ) + if ( usedCustomWidgets.findIndex( w->className ) == -1 ) continue; ts << makeIndent( indent ) << "<customwidget>" << endl; indent++; @@ -2716,7 +2716,7 @@ void Resource::saveTabOrder( TQTextStream &ts, int indent ) indent++; for ( TQWidget *w = l.first(); w; w = l.next() ) { - if ( w->testWState( TQt::WState_ForceHide ) || knownNames.tqfindIndex( w->name() ) == -1 ) + if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) continue; ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl; } @@ -3235,7 +3235,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) p->insert( a ); } if ( n.tagName() == "item" ) { - PopupMenuEditorItem *i = p->at( p->tqfind( a ) ); + PopupMenuEditorItem *i = p->at( p->find( a ) ); if ( i ) { TQString name = n.attribute( "name" ); formwindow->unify( i, name, TRUE ); diff --git a/kdevdesigner/designer/sourcefile.cpp b/kdevdesigner/designer/sourcefile.cpp index 5b21afa5..7ffb34f0 100644 --- a/kdevdesigner/designer/sourcefile.cpp +++ b/kdevdesigner/designer/sourcefile.cpp @@ -187,10 +187,10 @@ TQString SourceFile::createUnnamedFileName( const TQString &extension ) extensionCounter = new TQMap<TQString, int>; int count = -1; TQMap<TQString, int>::Iterator it; - if ( ( it = extensionCounter->tqfind( extension ) ) != extensionCounter->end() ) { + if ( ( it = extensionCounter->find( extension ) ) != extensionCounter->end() ) { count = *it; ++count; - extensionCounter->tqreplace( extension, count ); + extensionCounter->replace( extension, count ); } else { count = 1; extensionCounter->insert( extension, count ); diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp index b95f6bd2..1027615e 100644 --- a/kdevdesigner/designer/tableeditorimpl.cpp +++ b/kdevdesigner/designer/tableeditorimpl.cpp @@ -160,11 +160,11 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) #ifndef TQT_NO_SQL if ( ::tqqt_cast<TQDataTable*>(editTable) ) { - TQString s = *fieldMap.tqfind( listColumns->index( i ) ); + TQString s = *fieldMap.find( listColumns->index( i ) ); if ( s.isEmpty() ) comboFields->setCurrentItem( 0 ); - else if ( comboFields->listBox()->tqfindItem( s ) ) - comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->tqfindItem( s ) ) ); + else if ( comboFields->listBox()->findItem( s ) ) + comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) ); else comboFields->lineEdit()->setText( s ); } @@ -236,7 +236,7 @@ void TableEditor::newColumnClicked() m.insert( table->horizontalHeader()->label( i ), TRUE ); int n = table->numCols() - 1; TQString t = TQString::number( n ); - while ( m.tqfind( t ) != m.end() ) + while ( m.find( t ) != m.end() ) t = TQString::number( ++n ); table->horizontalHeader()->setLabel( table->numCols() - 1, t ); listColumns->insertItem( t ); @@ -264,7 +264,7 @@ void TableEditor::newRowClicked() m.insert( table->verticalHeader()->label( i ), TRUE ); int n = table->numRows() - 1; TQString t = TQString::number( n ); - while ( m.tqfind( t ) != m.end() ) + while ( m.find( t ) != m.end() ) t = TQString::number( ++n ); table->verticalHeader()->setLabel( table->numRows() - 1, t ); listRows->insertItem( t ); @@ -333,7 +333,7 @@ void TableEditor::applyClicked() col.text = table->horizontalHeader()->label( i ); if ( table->horizontalHeader()->iconSet( i ) ) col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *fieldMap.tqfind( i ); + col.field = *fieldMap.find( i ); cols.append( col ); } for ( i = 0; i < table->verticalHeader()->count(); ++i ) { @@ -423,7 +423,7 @@ void TableEditor::readFromTable() table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) ); listColumns->insertItem( editTable->horizontalHeader()->label( i ) ); } - TQString cf = *columnFields.tqfind( editTable->horizontalHeader()->label( i ) ); + TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) ); fieldMap.insert( i, cf ); } diff --git a/kdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp index bd0ef745..8cbf38f6 100644 --- a/kdevdesigner/designer/variabledialogimpl.cpp +++ b/kdevdesigner/designer/variabledialogimpl.cpp @@ -64,7 +64,7 @@ VariableDialog::~VariableDialog() void VariableDialog::setCurrentItem( TQString text ) { - TQListViewItem *i = varView->tqfindItem( text, 0 ); + TQListViewItem *i = varView->findItem( text, 0 ); if ( i ) varView->setCurrentItem( i ); } diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index c4b0b947..55bb4c0d 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -218,7 +218,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) int index = 0; TQRect rect; for ( ; index < tabBar()->count(); index++ ) { - if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) { + if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { rect = tabBar()->tabAt( index )->rect(); break; } @@ -227,7 +227,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) if ( index == tabBar()->count() -1 ) { TQRect rect2 = rect; rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.tqcontains( de->pos() ) ) + if ( rect2.contains( de->pos() ) ) index++; } @@ -255,20 +255,20 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) int newIndex = 0; for ( ; newIndex < tabBar()->count(); newIndex++ ) { - if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) ) + if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) break; } if ( newIndex == tabBar()->count() -1 ) { TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.tqcontains( de->pos() ) ) + if ( rect2.contains( de->pos() ) ) newIndex++; } int oldIndex = 0; for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { - if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) ) + if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) break; } @@ -329,7 +329,7 @@ void QDesignerWidgetStack::nextPage() int QDesignerWidgetStack::currentPage() const { QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; - return that->pages.tqfind( visibleWidget() ); + return that->pages.find( visibleWidget() ); } void QDesignerWidgetStack::setCurrentPage( int i ) @@ -384,12 +384,12 @@ int QDesignerWidgetStack::insertPage( TQWidget *p, int i ) raiseWidget( p ); TQApplication::sendPostedEvents(); updateButtons(); - return pages.tqfind( p ); + return pages.find( p ); } int QDesignerWidgetStack::removePage( TQWidget *p ) { - int i = pages.tqfind( p ); + int i = pages.find( p ); pages.remove( p ); removeWidget( p ); setCurrentPage( 0 ); @@ -464,7 +464,7 @@ int QDesignerWizard::pageNum( TQWidget *p ) void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) { TQWizard::addPage( p, t ); - if ( removedPages.tqfind( p ) ) + if ( removedPages.find( p ) ) removedPages.remove( p ); } @@ -477,7 +477,7 @@ void QDesignerWizard::removePage( TQWidget *p ) void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) { TQWizard::insertPage( p, t, index ); - if ( removedPages.tqfind( p ) ) + if ( removedPages.find( p ) ) removedPages.remove( p ); } @@ -505,9 +505,9 @@ void WidgetFactory::saveDefaultProperties( TQObject *w, int id ) var = TQVariant( TQPixmap() ); else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) var = TQVariant( TQIconSet() ); - propMap.tqreplace( lst.at( i ), var ); + propMap.replace( lst.at( i ), var ); } - defaultProperties->tqreplace( id, propMap ); + defaultProperties->replace( id, propMap ); } void WidgetFactory::saveChangedProperties( TQObject *w, int id ) @@ -545,9 +545,9 @@ TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, b return 0; MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - if ( !defaultProperties->tqcontains( id ) ) + if ( !defaultProperties->contains( id ) ) saveDefaultProperties( TQT_TQOBJECT(w), id ); - if ( !changedProperties->tqcontains( id ) ) + if ( !changedProperties->contains( id ) ) saveChangedProperties( TQT_TQOBJECT(w), id ); return w; @@ -1372,13 +1372,13 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) { TQString className = WidgetDatabase::className( id ); - if ( className.tqcontains( "ListBox" ) ) + if ( className.contains( "ListBox" ) ) return TRUE; - if ( className.tqcontains( "ComboBox" ) ) + if ( className.contains( "ComboBox" ) ) return TRUE; - if ( className.tqcontains( "ListView" ) ) + if ( className.contains( "ListView" ) ) return TRUE; - if ( className.tqcontains( "IconView" ) ) + if ( className.contains( "IconView" ) ) return TRUE; if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) return TRUE; @@ -1392,8 +1392,8 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) { TQString className = WidgetDatabase::className( id ); - if ( className.tqcontains( "ListBox" ) || className.tqcontains( "ListView" ) || - className.tqcontains( "IconView" ) || className.tqcontains( "ComboBox" ) || + if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || + className.contains( "IconView" ) || className.contains( "ComboBox" ) || ::tqqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; @@ -1404,7 +1404,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget { TQString className = WidgetDatabase::className( id ); - if ( className.tqcontains( "ListBox" ) ) { + if ( className.contains( "ListBox" ) ) { if ( !::tqqt_cast<TQListBox*>(editWidget) ) return; ListBoxEditor *e = new ListBoxEditor( tqparent, editWidget, fw ); @@ -1413,7 +1413,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget return; } - if ( className.tqcontains( "ComboBox" ) ) { + if ( className.contains( "ComboBox" ) ) { if ( !::tqqt_cast<TQComboBox*>(editWidget) ) return; TQComboBox *cb = (TQComboBox*)editWidget; @@ -1424,7 +1424,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget return; } - if ( className.tqcontains( "ListView" ) ) { + if ( className.contains( "ListView" ) ) { if ( !::tqqt_cast<TQListView*>(editWidget) ) return; TQListView *lv = (TQListView*)editWidget; @@ -1434,7 +1434,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget return; } - if ( className.tqcontains( "IconView" ) ) { + if ( className.contains( "IconView" ) ) { if ( !::tqqt_cast<TQIconView*>(editWidget) ) return; IconViewEditor *e = new IconViewEditor( tqparent, editWidget, fw ); @@ -1463,14 +1463,14 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) { if ( propName == "name" || propName == "geometry" ) return FALSE; - TQStringList l = *changedProperties->tqfind( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); - return l.tqfindIndex( propName ) == -1; + TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); + return l.findIndex( propName ) == -1; } bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) { const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()-> - tqfindProperty( propName, TRUE ), TRUE ); + findProperty( propName, TRUE ), TRUE ); if (!p ) return FALSE; return p->reset( w ); @@ -1491,13 +1491,13 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) return TQVariant( -1 ); } - return *( *defaultProperties->tqfind( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).tqfind( propName ); + return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); } TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) { const TQMetaProperty *p = w->tqmetaObject()-> - property( w->tqmetaObject()->tqfindProperty( propName, TRUE ), TRUE ); + property( w->tqmetaObject()->findProperty( propName, TRUE ), TRUE ); if ( !p ) { int v = defaultValue( w, "tqalignment" ).toInt(); if ( propName == "hAlign" ) { @@ -1536,7 +1536,7 @@ TQWidget *WidgetFactory::createCustomWidget( TQWidget *tqparent, const char *nam TQVariant WidgetFactory::property( TQObject *w, const char *name ) { - int id = w->tqmetaObject()->tqfindProperty( name, TRUE ); + int id = w->tqmetaObject()->findProperty( name, TRUE ); const TQMetaProperty* p = w->tqmetaObject()->property( id, TRUE ); if ( !p || !p->isValid() ) return MetaDataBase::fakeProperty( w, name ); diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h index b25e506e..43f19f7f 100644 --- a/kdevdesigner/designer/widgetfactory.h +++ b/kdevdesigner/designer/widgetfactory.h @@ -216,7 +216,7 @@ public: void addPage( TQWidget *p, const TQString & ); void removePage( TQWidget *p ); void insertPage( TQWidget *p, const TQString &t, int index ); - bool isPageRemoved( TQWidget *p ) { return (removedPages.tqfind( p ) != 0); } + bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); } bool isModal() const { return modal; } void setModal(bool b) { modal = b; } diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp index 8668c331..664a586e 100644 --- a/kdevdesigner/designer/workspace.cpp +++ b/kdevdesigner/designer/workspace.cpp @@ -681,7 +681,7 @@ void Workspace::bufferChosen( const TQString &buffer ) if ( bufferEdit ) bufferEdit->setText( "" ); - if ( MainWindow::self->projectFileNames().tqcontains( buffer ) ) { + if ( MainWindow::self->projectFileNames().contains( buffer ) ) { MainWindow::self->setCurrentProjectByFilename( buffer ); return; } diff --git a/kdevdesigner/interfaces/editorinterface.h b/kdevdesigner/interfaces/editorinterface.h index e0d6fc06..21a76fb1 100644 --- a/kdevdesigner/interfaces/editorinterface.h +++ b/kdevdesigner/interfaces/editorinterface.h @@ -75,8 +75,8 @@ struct EditorInterface : public TQUnknownInterface virtual void copy() = 0; virtual void paste() = 0; virtual void selectAll() = 0; - virtual bool tqfind( const TQString &expr, bool cs, bool wo, bool forward, bool startAtCursor ) = 0; - virtual bool tqreplace( const TQString &tqfind, const TQString &tqreplace, bool cs, bool wo, bool forward, bool startAtCursor, bool replaceAll ) = 0; + virtual bool find( const TQString &expr, bool cs, bool wo, bool forward, bool startAtCursor ) = 0; + virtual bool replace( const TQString &find, const TQString &replace, bool cs, bool wo, bool forward, bool startAtCursor, bool replaceAll ) = 0; virtual void gotoLine( int line ) = 0; virtual void indent() = 0; virtual void scrollTo( const TQString &txt, const TQString &first ) = 0; diff --git a/kdevdesigner/plugins/languageinterfaceimpl.cpp b/kdevdesigner/plugins/languageinterfaceimpl.cpp index ac4f8326..fb05aaeb 100644 --- a/kdevdesigner/plugins/languageinterfaceimpl.cpp +++ b/kdevdesigner/plugins/languageinterfaceimpl.cpp @@ -86,9 +86,9 @@ void LanguageInterfaceImpl::functions( const TQString &code, TQValueList<Functio Function func; func.name = (*it).prototype(); func.name.remove( 0, (*it).returnType().length() ); - if ( func.name.tqfind( "::" ) == -1 ) + if ( func.name.find( "::" ) == -1 ) continue; - func.name.remove( (uint)0, func.name.tqfind( "::" ) + 2 ); + func.name.remove( (uint)0, func.name.find( "::" ) + 2 ); func.body = (*it).body(); func.returnType = (*it).returnType(); func.start = (*it).functionStartLineNum(); diff --git a/kdevdesigner/shared/parser.cpp b/kdevdesigner/shared/parser.cpp index 03dc57a7..1ba246bd 100644 --- a/kdevdesigner/shared/parser.cpp +++ b/kdevdesigner/shared/parser.cpp @@ -38,9 +38,9 @@ public: TQString Parser::cleanArgs( const TQString &func ) { TQString slot( func ); - int begin = slot.tqfind( "(" ) + 1; + int begin = slot.find( "(" ) + 1; TQString args = slot.mid( begin ); - args = args.left( args.tqfind( ")" ) ); + args = args.left( args.find( ")" ) ); TQStringList lst = TQStringList::split( ',', args ); TQString res = slot.left( begin ); for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { @@ -48,13 +48,13 @@ TQString Parser::cleanArgs( const TQString &func ) res += ","; TQString arg = *it; int pos = 0; - if ( ( pos = arg.tqfind( "&" ) ) != -1 ) { + if ( ( pos = arg.find( "&" ) ) != -1 ) { arg = arg.left( pos + 1 ); - } else if ( ( pos = arg.tqfind( "*" ) ) != -1 ) { + } else if ( ( pos = arg.find( "*" ) ) != -1 ) { arg = arg.left( pos + 1 ); } else { arg = arg.simplifyWhiteSpace(); - if ( ( pos = arg.tqfind( ':' ) ) != -1 ) + if ( ( pos = arg.find( ':' ) ) != -1 ) arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace(); TQStringList l = TQStringList::split( ' ', arg ); if ( l.count() == 2 ) { diff --git a/kdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp index 7e56dfa1..d4645eaa 100644 --- a/kdevdesigner/shared/ui2uib.cpp +++ b/kdevdesigner/shared/ui2uib.cpp @@ -164,7 +164,7 @@ public: int insert() { return next++; } void setName( int no, const TQString& name ); - int tqfind( const TQString& name, int deflt = -1 ) const; + int find( const TQString& name, int deflt = -1 ) const; int count() const { return next; } private: @@ -181,10 +181,10 @@ void UibIndexMap::setName( int no, const TQString& name ) } } -int UibIndexMap::tqfind( const TQString& name, int deflt ) const +int UibIndexMap::find( const TQString& name, int deflt ) const { - TQMap<TQString, int>::ConstIterator no = nameMap.tqfind( name ); - if ( no == nameMap.end() || conflicts.tqcontains(name) ) { + TQMap<TQString, int>::ConstIterator no = nameMap.find( name ); + if ( no == nameMap.end() || conflicts.contains(name) ) { return deflt; } else { return *no; @@ -232,7 +232,7 @@ static void packString( UibStrTable& strings, TQDataStream& out, static void packStringSplit( UibStrTable& strings, TQDataStream& out, const TQString& str, TQChar sep ) { - int pos = str.tqfind( sep ); + int pos = str.find( sep ); if ( pos == -1 ) pos = str.length(); packString( strings, out, str.left(pos) ); @@ -516,7 +516,7 @@ static int outputObject( TQMap<int, TQStringList>& buddies, if ( tag == "action" ) { if ( elem.tagName() == "item" || elem.tagName() == "toolbar" ) { TQString actionName = f.attribute( "name" ); - int no = objects.tqfind( actionName ); + int no = objects.find( actionName ); if ( no != -1 ) { out << (TQ_UINT8) Object_ActionRef; packUInt16( out, no ); @@ -756,7 +756,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) while ( !f.isNull() ) { if ( f.tagName() == "tabstop" ) { TQString widgetName = f.firstChild().toText().data(); - int no = objects.tqfind( widgetName ); + int no = objects.find( widgetName ); if ( no != -1 ) packUInt16( out2, no ); } @@ -791,7 +791,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) while ( a != buddies.end() ) { TQStringList::ConstIterator b = (*a).begin(); while ( b != (*a).end() ) { - int no = objects.tqfind( *b ); + int no = objects.find( *b ); if ( no != -1 ) { packUInt16( out2, a.key() ); packUInt16( out2, no ); @@ -822,8 +822,8 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) } TQString language = f.attribute( "language", "C++" ); - int senderNo = objects.tqfind( argMap["sender"], widgetNo ); - int receiverNo = objects.tqfind( argMap["receiver"], widgetNo ); + int senderNo = objects.find( argMap["sender"], widgetNo ); + int receiverNo = objects.find( argMap["receiver"], widgetNo ); TQString signal = UibHack::normalize( argMap["signal"] ); TQString slot = UibHack::normalize( argMap["slot"] ); diff --git a/kdevdesigner/shared/uib.h b/kdevdesigner/shared/uib.h index 07607328..9f2090f7 100644 --- a/kdevdesigner/shared/uib.h +++ b/kdevdesigner/shared/uib.h @@ -108,7 +108,7 @@ inline int UibStrTable::insertCString( const char *cstr ) inline int UibStrTable::insertString( const TQString& str ) { - if ( str.tqcontains('\0') || str[0] == TQChar(0x7f) ) { + if ( str.contains('\0') || str[0] == TQChar(0x7f) ) { int nextPos = table.size(); out << (TQ_UINT8) 0x7f; out << str; diff --git a/kdevdesigner/shared/widgetdatabase.cpp b/kdevdesigner/shared/widgetdatabase.cpp index 1950ddbb..80e8c131 100644 --- a/kdevdesigner/shared/widgetdatabase.cpp +++ b/kdevdesigner/shared/widgetdatabase.cpp @@ -764,7 +764,7 @@ TQString WidgetDatabase::createWidgetName( int id ) n = "Layout"; if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) n = n.mid( 1 ); - int colonColon = n.tqfindRev( "::" ); + int colonColon = n.findRev( "::" ); if ( colonColon != -1 ) n = n.mid( colonColon + 2 ); @@ -783,14 +783,14 @@ int WidgetDatabase::idFromClassName( const TQString &name ) setupDataBase( -1 ); if ( name.isEmpty() ) return 0; - int *i = className2Id->tqfind( name ); + int *i = className2Id->find( name ); if ( i ) return *i; if ( name == "FormWindow" ) return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); #ifdef UIC setupDataBase( -2 ); - i = className2Id->tqfind( name ); + i = className2Id->find( name ); if ( i ) return *i; #endif @@ -799,7 +799,7 @@ int WidgetDatabase::idFromClassName( const TQString &name ) bool WidgetDatabase::hasWidget( const TQString &name ) { - return className2Id->tqfind( name ) != 0; + return className2Id->find( name ) != 0; } WidgetDatabaseRecord *WidgetDatabase::at( int index ) @@ -832,7 +832,7 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r ) TQString WidgetDatabase::widgetGroup( const TQString &g ) { - if ( wGroups->tqfind( g.ascii() ) == -1 ) + if ( wGroups->find( g.ascii() ) == -1 ) wGroups->append( g.ascii() ); return g; } @@ -866,7 +866,7 @@ int WidgetDatabase::numWidgetGroups() bool WidgetDatabase::isGroupVisible( const TQString &g ) { setupDataBase( -1 ); - return invisibleGroups->tqfind( g.ascii() ) == -1; + return invisibleGroups->find( g.ascii() ) == -1; } int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index d8930366..842f8a92 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -177,7 +177,7 @@ static TQImage loadImageData( const TQString& format, ulong len, TQByteArray dat dataTmp[3] = ( len & 0x000000ff ); TQByteArray baunzip = tqUncompress( dataTmp ); len = baunzip.size(); - img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.tqfind('.')).ascii() ); + img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')).ascii() ); } else { img.loadFromData( (const uchar*)data.data(), data.size(), format.ascii() ); } @@ -351,7 +351,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge #ifndef TQT_NO_SQL TQMap<TQWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin(); for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { - if ( widgetFactory->noDatabaseWidgets.tqfind( cit.key()->name() ) != + if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) @@ -367,10 +367,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING ); if ( !table ) continue; - if ( widgetFactory->noDatabaseWidgets.tqfind( table->name() ) != + if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; - TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.tqfind( table ); + TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table ); TQString conn = (*it)[ 0 ]; TQSqlCursor* c = 0; TQSqlDatabase *db = 0; @@ -1359,7 +1359,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, return toplevel; } -/*! Installs a widget factory \a factory, which normally tqcontains +/*! Installs a widget factory \a factory, which normally contains additional widgets that can then be created using a TQWidgetFactory. See createWidget() for further details. */ @@ -1534,7 +1534,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tq if ( iface ) { TQWidget *w = iface->create( className, tqparent, name ); if ( w ) { - d->customWidgets.tqreplace( className.latin1(), new bool(TRUE) ); + d->customWidgets.replace( className.latin1(), new bool(TRUE) ); return w; } } @@ -1564,7 +1564,7 @@ TQStringList TQWidgetFactory::widgets() bool TQWidgetFactory::supportsWidget( const TQString &widget ) { setupWidgetListAndMap(); - return ( availableWidgetMap->tqfind( widget ) != availableWidgetMap->end() ); + return ( availableWidgetMap->find( widget ) != availableWidgetMap->end() ); } TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *tqparent, @@ -1627,7 +1627,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget } #ifdef TQT_CONTAINER_CUSTOM_WIDGETS TQString parentClassName = tqparent ? tqparent->className() : 0; - bool isPlugin = tqparent ? !!d->customWidgets.tqfind( tqparent->className() ) : FALSE; + bool isPlugin = tqparent ? !!d->customWidgets.find( tqparent->className() ) : FALSE; if ( isPlugin ) qWarning( "####### loading custom container widgets without page support not implemented!" ); // ### TODO loading for custom container widgets without pages @@ -1808,7 +1808,7 @@ TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *tqlayout ) co void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, TQVariant value ) { - int offset = obj->tqmetaObject()->tqfindProperty( prop.ascii(), TRUE ); + int offset = obj->tqmetaObject()->findProperty( prop.ascii(), TRUE ); if ( offset != -1 ) { if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { @@ -2148,14 +2148,14 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQStrList slotList = receiver->tqmetaObject()->slotNames( TRUE ); // if this is a connection to a custom slot and we have a connector, try this as receiver - if ( slotList.tqfind( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) { + if ( slotList.find( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) { slotList = connector->tqmetaObject()->slotNames( TRUE ); receiver = connector; } // avoid warnings - if ( signalList.tqfind( conn.signal ) == -1 || - slotList.tqfind( conn.slot ) == -1 ) { + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) { n = n.nextSibling().toElement(); continue; } @@ -2224,8 +2224,8 @@ void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& tx } TQValueList<Field> fieldMap; - if ( fieldMaps.tqfind( table ) != fieldMaps.end() ) { - fieldMap = *fieldMaps.tqfind( table ); + if ( fieldMaps.find( table ) != fieldMaps.end() ) { + fieldMap = *fieldMaps.find( table ); fieldMaps.remove( table ); } |