diff options
Diffstat (limited to 'kommander/editor')
29 files changed, 289 insertions, 289 deletions
diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 54a5e0f9..a9437ad7 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -329,7 +329,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 ); } @@ -343,7 +343,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() && (*it)->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else @@ -353,11 +353,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() ), @@ -367,7 +367,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 ) @@ -413,11 +413,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() ), @@ -434,13 +434,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() ), @@ -457,7 +457,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( a->iconSet().pixmap() ); if ( a->inherits( "QDesignerAction" ) ) { - 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() ) { @@ -519,7 +519,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 ) @@ -534,7 +534,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) a = (QDesignerActionGroup*)s.toLong(); } - 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." ). @@ -665,7 +665,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 ) @@ -738,7 +738,7 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) menu.insertItem( i18n("Rename Item..." ), 2 ); int res = menu.exec( e->globalPos() ); if ( res == 1 ) { - TQMenuItem *item = tqfindItem( idAt( itm ) ); + TQMenuItem *item = findItem( idAt( itm ) ); RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).tqarg( item->text() ), formWindow, (TQMainWindow*)parentWidget(), this, @@ -789,8 +789,8 @@ void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) int itm = itemAtPos( dragStartPos ); if ( itm == -1 ) return; - TQPopupMenu *popup = tqfindItem( idAt( itm ) )->popup(); - TQString txt = tqfindItem( idAt( itm ) )->text(); + TQPopupMenu *popup = findItem( idAt( itm ) )->popup(); + TQString txt = findItem( idAt( itm ) )->text(); removeItemAt( itm ); TQStoredDrag *drag = new TQStoredDrag( "application/x-designer-menuitem", this ); @@ -874,8 +874,8 @@ void QDesignerMenuBar::dropEvent( TQDropEvent *e ) return; e->accept(); TQString s( e->tqencodedData( "application/x-designer-menuitem" ) ); - TQString s1 = s.left( s.tqfind( "/" ) ); - TQString s2 = s.mid( s.tqfind( "/" ) + 1 ); + TQString s1 = s.left( s.find( "/" ) ); + TQString s2 = s.mid( s.find( "/" ) + 1 ); TQPopupMenu *popup = (TQPopupMenu*)s1.toLong(); // #### huha, that is evil TQString txt = s2; insertItem( txt, popup, -1, insertAt ); @@ -948,14 +948,14 @@ void QDesignerMenuBar::setItemName( const TQCString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; - tqfindItem( idAt( itemNum ) )->popup()->setName( s ); + findItem( idAt( itemNum ) )->popup()->setName( s ); } TQCString QDesignerMenuBar::itemName() const { if ( itemNum < 0 || itemNum >= (int)count() ) return ""; - return tqfindItem( idAt( itemNum ) )->popup()->name(); + return findItem( idAt( itemNum ) )->popup()->name(); } @@ -1155,7 +1155,7 @@ void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) } } - 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 menu.\n" "An Action may only occur once in a given menu." ). diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h index 66a87c5b..c041f9db 100644 --- a/kommander/editor/actiondnd.h +++ b/kommander/editor/actiondnd.h @@ -44,7 +44,7 @@ public: : TQActionGroup( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ) {} 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/kommander/editor/asciivalidator.cpp b/kommander/editor/asciivalidator.cpp index 947b3ec1..33381e0b 100644 --- a/kommander/editor/asciivalidator.cpp +++ b/kommander/editor/asciivalidator.cpp @@ -67,7 +67,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/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp index 76bf67f6..106e0ab0 100644 --- a/kommander/editor/assoctexteditorimpl.cpp +++ b/kommander/editor/assoctexteditorimpl.cpp @@ -113,7 +113,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, if (a) a->plug(popup); popup->insertSeparator(); - a = view->actionCollection()->action("edit_tqfind"); + a = view->actionCollection()->action("edit_find"); if (a) a->plug(popup); a = view->actionCollection()->action("edit_find_next"); @@ -122,7 +122,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, a = view->actionCollection()->action("edit_find_prev"); if (a) a->plug(popup); - a = view->actionCollection()->action("edit_tqreplace"); + a = view->actionCollection()->action("edit_replace"); if (a) a->plug(popup); popup->insertSeparator(); @@ -246,7 +246,7 @@ void AssocTextEditor::setWidget(TQWidget *a_widget) undoIf->clearUndo(); - if (openedWidgets.tqcontains(m_widget)) + if (openedWidgets.contains(m_widget)) { if (readOnlyAction && !readOnly) readOnlyAction->activate(); @@ -317,7 +317,7 @@ TQStringList AssocTextEditor::buildWidgetList() TQMetaObject *metaObj = it.current()->tqmetaObject(); if(metaObj) { - int id = metaObj->tqfindProperty("KommanderWidget", true); + int id = metaObj->findProperty("KommanderWidget", true); const TQMetaProperty *metaProp = metaObj->property(id, true); if(metaProp && metaProp->isValid()) pExists = true; @@ -363,7 +363,7 @@ void AssocTextEditor::stateChanged(int a_index) { if (hlIf->hlModeSectionName(i) == "Scripts") highlightPopup->insertItem(hlIf->hlModeName(i), i); - if (hlIf->hlModeName(i).tqcontains(hlType, false) > 0) + if (hlIf->hlModeName(i).contains(hlType, false) > 0) { hlIf->setHlMode(i); highlightPopup->setItemChecked(i, true); @@ -464,7 +464,7 @@ TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted) TQWidget* AssocTextEditor::widgetFromString(const TQString& name) { TQString realname = name; - int i = realname.tqfind(' '); + int i = realname.find(' '); if (i != -1) realname.truncate(i); return m_widgetList[realname]; diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp index 4fe816e2..e440a8fd 100644 --- a/kommander/editor/choosewidgetimpl.cpp +++ b/kommander/editor/choosewidgetimpl.cpp @@ -93,7 +93,7 @@ TQString ChooseWidget::selection() void ChooseWidget::textChanged(const TQString& text) { - TQListViewItem* item = widgetView->tqfindItem(text, 0, TQt::BeginsWith); + TQListViewItem* item = widgetView->findItem(text, 0, TQt::BeginsWith); if (item) { widgetView->setCurrentItem(item); widgetView->ensureItemVisible(item); @@ -106,7 +106,7 @@ bool ChooseWidget::isKommanderWidget(TQObject* w) TQMetaObject *metaObj = w->tqmetaObject(); if (metaObj) { - int id = metaObj->tqfindProperty("KommanderWidget", true); + int id = metaObj->findProperty("KommanderWidget", true); const TQMetaProperty *metaProp = metaObj->property(id, true); if (metaProp && metaProp->isValid()) pExists = true; diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index df4568fb..40a1c088 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -396,7 +396,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, @@ -461,7 +461,7 @@ bool SetPropertyCommand::canMerge( Command *c ) { SetPropertyCommand *cmd = (SetPropertyCommand*)c; 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; @@ -532,16 +532,16 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ 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 ); @@ -1522,7 +1522,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 ) { diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp index e6a48fde..62110d73 100644 --- a/kommander/editor/connectioneditorimpl.cpp +++ b/kommander/editor/connectioneditorimpl.cpp @@ -109,7 +109,7 @@ ConnectionEditor::ConnectionEditor(TQWidget* tqparent, TQObject* sndr, TQObject* !it.current()->inherits("Spacer") && qstrcmp(it.current()->name(), "central widget") && !m_formWindow->isMainContainer(TQT_TQOBJECT(it.current())) && - !lst.tqcontains(it.current()->name())) + !lst.contains(it.current()->name())) lst << it.current()->name(); } @@ -213,7 +213,7 @@ void ConnectionEditor::disconnectClicked() if (!p_item) return; - TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.tqfind(p_item); + TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item); if (it != m_connections.end()) m_connections.remove(it); delete p_item; @@ -277,7 +277,7 @@ void ConnectionEditor::senderChanged(const TQString& s) TQStrList p_sigs = m_sender->tqmetaObject()->signalNames(true); signalBox->clear(); for (TQStrListIterator it(p_sigs); it.current(); ++it) - if (!isSignalIgnored(it.current()) && !signalBox->tqfindItem(it.current(), TQt::ExactMatch)) + if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), TQt::ExactMatch)) signalBox->insertItem(it.current()); if (TQT_BASE_OBJECT(m_sender) == TQT_BASE_OBJECT(m_formWindow->mainContainer())) signalBox->insertStringList(MetaDataBase::signalList(TQT_TQOBJECT(m_formWindow))); @@ -298,7 +298,7 @@ void ConnectionEditor::receiverChanged(const TQString& s) for (int i = 0; i < n; ++i) { const TQMetaData* md = m_receiver->tqmetaObject()->slot(i, true); - if (!isSlotIgnored(md) && !slotBox->tqfindItem(md->tqt_mo_ci_name, TQt::ExactMatch)) + if (!isSlotIgnored(md) && !slotBox->findItem(md->tqt_mo_ci_name, TQt::ExactMatch)) slotBox->insertItem(md->tqt_mo_ci_name); } slotBox->sort(); diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp index 90b9ba18..ff2e4c06 100644 --- a/kommander/editor/formfile.cpp +++ b/kommander/editor/formfile.cpp @@ -80,7 +80,7 @@ void FormFile::setFileName(const TQString &fn) return; if (fn.isEmpty()) { fileNameTemp = true; - if (filename.tqfind("unnamed")) + if (filename.find("unnamed")) filename = createUnnamedFileName(); return; } @@ -264,7 +264,7 @@ TQString FormFile::formName() const line = ts.readLine(); if (!className.isEmpty()) { - int end = line.tqfind("</class>"); + int end = line.find("</class>"); if (end == -1) className += line; else @@ -275,9 +275,9 @@ TQString FormFile::formName() const continue; } int start; - if ((start = line.tqfind("<class>")) != -1) + if ((start = line.find("<class>")) != -1) { - int end = line.tqfind("</class>"); + int end = line.find("</class>"); if (end == -1) className = line.mid(start + 7); else diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 590d1c47..55c1b142 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -81,7 +81,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); @@ -210,7 +210,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()); @@ -362,10 +362,10 @@ void FormWindow::insertWidget() TQObject *o = it.current(); ++it; if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) && - insertedWidgets.tqfind((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w)) + insertedWidgets.find((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); } } @@ -461,7 +461,7 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w) // if widget is laid out, find the first non-laid out super-widget TQWidget *realWidget = w; // but store the original one while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) != - WidgetFactory::NoLayout || !insertedWidgets.tqfind(w))) + WidgetFactory::NoLayout || !insertedWidgets.find(w))) w = w->parentWidget(); if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget) @@ -530,7 +530,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) { if (!o->isWidgetType()) continue; - if (insertedWidgets.tqfind((TQWidget*)o)) + if (insertedWidgets.find((TQWidget*)o)) selectWidget(TQT_TQOBJECT(o), false); } setPropertyShowingBlocked(false); @@ -552,7 +552,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))) + || !insertedWidgets.find(w))) w = w->parentWidget(); if (e->button() == Qt::LeftButton) @@ -609,7 +609,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *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); @@ -665,7 +665,7 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *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); @@ -696,7 +696,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) { // we are prepated for a move // 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::NoLayout || !insertedWidgets.find(w))) w = w->parentWidget(); // calc correct position TQPoint pos = w->mapFromGlobal(e->globalPos()); @@ -793,7 +793,7 @@ 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)) newReceiver = wid; if (newReceiver && (newReceiver->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) || newReceiver->inherits("Spacer"))) @@ -801,7 +801,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver); currentConnectPos = mapFromGlobal(e->globalPos()); if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver)) - || insertedWidgets.tqfind(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver))) + || insertedWidgets.find(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver))) connectReceiver = connectableObject(TQT_TQOBJECT(newReceiver), TQT_TQOBJECT(connectReceiver)); mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").tqarg(connectSender->name()). arg(connectReceiver->name())); @@ -832,7 +832,7 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) { // we moved the widget sizePreviewLabel->hide(); - if (moving.isEmpty() || w->pos() == *moving.tqfind((ulong) w)) + if (moving.isEmpty() || w->pos() == *moving.find((ulong) w)) break; // restore targetContainer @@ -1064,7 +1064,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; } @@ -1118,7 +1118,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(); @@ -1143,7 +1143,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) emitSelectionChanged(); } else { - WidgetSelection *s = usedSelections.tqfind(w); + WidgetSelection *s = usedSelections.find(w); if (s) s->setWidget(0); TQObject *opw = propertyWidget; @@ -1168,7 +1168,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) @@ -1177,14 +1177,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(); } @@ -1291,7 +1291,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)); } } @@ -1303,7 +1303,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 } @@ -1350,7 +1350,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; @@ -1363,7 +1363,7 @@ void FormWindow::updateChildSelections(TQWidget * w) { for (TQObject * o = l->first(); o; o = l->next()) { - if (o->isWidgetType() && insertedWidgets.tqfind((TQWidget *) o)) + if (o->isWidgetType() && insertedWidgets.find((TQWidget *) o)) updateSelection((TQWidget *) o); } delete l; @@ -1385,7 +1385,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); @@ -1500,7 +1500,7 @@ void FormWindow::invalidCheckedSelections() void FormWindow::checkPreviewGeometry(TQRect & r) { - if (TQT_TQRECT_OBJECT(rect()).tqcontains(r)) + if (TQT_TQRECT_OBJECT(rect()).contains(r)) return; if (r.left() < rect().left()) r.moveTopLeft(TQPoint(0, r.top())); @@ -1699,7 +1699,7 @@ void FormWindow::showOrderIndicators() { OrderIndicator *ind = new OrderIndicator(order++, w, this); orderIndicators.append(ind); - if (stackedWidgets.tqfindRef(w) == -1) + if (stackedWidgets.findRef(w) == -1) stackedWidgets.append(w); } } @@ -1788,14 +1788,14 @@ void FormWindow::lowerWidgets() static 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; @@ -1820,11 +1820,11 @@ void FormWindow::checkAccels() { 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) @@ -1969,7 +1969,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)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out ChildrenQt::Horizontally"), @@ -1990,7 +1990,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)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out ChildrenQt::Vertically"), @@ -2014,7 +2014,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)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out Children in a Grid"), @@ -2067,7 +2067,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w) { if (o->isWidgetType() && !mainWindow()->isAToolBarChild(TQT_TQOBJECT(o)) && - ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o)) + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) widgets.append((TQWidget *) o); } return new BreakLayoutCommand(i18n("Break Layout"), this, @@ -2102,7 +2102,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; @@ -2116,7 +2116,7 @@ bool FormWindow::allowMove(TQWidget *w) w = w->parentWidget(); while (w) { - if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.tqfind(w)) && WidgetFactory::layoutType(w) == + if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) return true; w = w->parentWidget(); @@ -2197,7 +2197,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); @@ -2366,7 +2366,7 @@ bool FormWindow::isDatabaseWidgetUsed() const for (; it.current(); ++it) { TQString c(it.current()->className()); - if (dbClasses.tqcontains(c) > 0) + if (dbClasses.contains(c) > 0) return true; } #endif @@ -2444,7 +2444,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); @@ -2457,7 +2457,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()) @@ -2467,7 +2467,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) 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(); } @@ -2475,8 +2475,8 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) int wd = widgetDepth(it.current()); if (wd == depth && container && (it.current()->parentWidget()-> - childrenListObject()).tqfind(TQT_TQOBJECT(it.current())) > - (container->parentWidget()->childrenListObject()).tqfind(TQT_TQOBJECT(container))) + childrenListObject()).find(TQT_TQOBJECT(it.current())) > + (container->parentWidget()->childrenListObject()).find(TQT_TQOBJECT(container))) wd++; if (wd > depth && !isChildOf(it.current(), notParentOf)) { depth = wd; diff --git a/kommander/editor/functionsimpl.cpp b/kommander/editor/functionsimpl.cpp index 991377f8..9520360f 100644 --- a/kommander/editor/functionsimpl.cpp +++ b/kommander/editor/functionsimpl.cpp @@ -133,7 +133,7 @@ TQString FunctionsDialog::currentFunctionText() return TQString("%1%2%3").tqarg(prefix).tqarg(functionListBox->currentText()).tqarg(params()); else if (groupComboBox->currentItem() == m_DCOP || groupComboBox->currentItem() == m_Slots) return TQString("%1%2.%3%4").tqarg(prefix).tqarg(widgetComboBox->currentText().section(' ', 0, 0)) - .tqarg(functionListBox->currentText().left(functionListBox->currentText().tqfind('('))).tqarg(params()); + .tqarg(functionListBox->currentText().left(functionListBox->currentText().find('('))).tqarg(params()); else return TQString("%1%2%3%4").tqarg(prefix).tqarg(function) .tqarg(functionListBox->currentText()).tqarg(params()); @@ -152,10 +152,10 @@ void FunctionsDialog::groupChanged(int index) { TQString slot = pFunctions[i]; TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1); - if (slotArgStr.isEmpty() || m_acceptedSlots.tqcontains(slotArgStr)) + if (slotArgStr.isEmpty() || m_acceptedSlots.contains(slotArgStr)) { TQString name = slot.remove("()"); - if (!m_slotList.tqcontains(name)) + if (!m_slotList.contains(name)) { m_slotList[name] = slot; functionListBox->insertItem(name); @@ -238,7 +238,7 @@ void FunctionsDialog::copyText() insertedText->getCursorPosition(¶, &i); // int cursorPos = insertedText->cursorPosition(); insertedText->insert(text); - insertedText->setCursorPosition(para, i + text.tqfind('(') + 1); + insertedText->setCursorPosition(para, i + text.find('(') + 1); } void FunctionsDialog::showParameters() diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index 318a17a2..ee5c6642 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -254,7 +254,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) return; } - if ( !formWindow->widgets()->tqfind( w ) ) { + if ( !formWindow->widgets()->find( w ) ) { if ( w->tqparent() && w->tqparent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) && w->tqparent()->tqparent() && ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || @@ -427,7 +427,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) for ( ; it.current(); --it ) { if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() ) continue; - if ( !formWindow->widgets()->tqfind( (TQWidget*)it.current() ) ) { + if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { if ( it.current()->tqparent() && ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) && @@ -491,7 +491,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) return; if ( w != formWindow && - !formWindow->widgets()->tqfind( w ) ) + !formWindow->widgets()->find( w ) ) return; if ( w->isVisibleTo( formWindow ) ) { diff --git a/kommander/editor/kommander-new.xml b/kommander/editor/kommander-new.xml index 7fe9f7dc..5c170485 100644 --- a/kommander/editor/kommander-new.xml +++ b/kommander/editor/kommander-new.xml @@ -140,14 +140,14 @@ <list name="kmdrstring"> <item>str_length</item> - <item>str_tqcontains</item> - <item>str_tqfind</item> - <item>str_tqfindRev</item> + <item>str_contains</item> + <item>str_find</item> + <item>str_findRev</item> <item>str_left</item> <item>str_right</item> <item>str_mid</item> <item>str_remove</item> - <item>str_tqreplace</item> + <item>str_replace</item> <item>str_upper</item> <item>str_lower</item> <item>str_compare</item> diff --git a/kommander/editor/kommander.xml b/kommander/editor/kommander.xml index b88bd6d7..a2f926fa 100644 --- a/kommander/editor/kommander.xml +++ b/kommander/editor/kommander.xml @@ -104,14 +104,14 @@ <list name="kmdrstring"> <item>length</item> - <item>tqcontains</item> - <item>tqfind</item> - <item>tqfindRev</item> + <item>contains</item> + <item>find</item> + <item>findRev</item> <item>left</item> <item>right</item> <item>mid</item> <item>remove</item> - <item>tqreplace</item> + <item>replace</item> <item>upper</item> <item>lower</item> <item>compare</item> @@ -418,7 +418,7 @@ <item> expr </item> <item> fbset </item> <item> file </item> - <item> tqfind </item> + <item> find </item> <item> flex </item> <item> flex++ </item> <item> fmt </item> diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp index 8d7d3d50..152548b2 100644 --- a/kommander/editor/layout.cpp +++ b/kommander/editor/layout.cpp @@ -189,7 +189,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 ); } @@ -242,7 +242,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/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index 8a30d812..8290fbda 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -108,7 +108,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; @@ -837,7 +837,7 @@ FormWindow *MainWindow::formWindow() if (qworkspace->activeWindow()->inherits("FormWindow")) fw = (FormWindow*)qworkspace->activeWindow(); else if (lastActiveFormWindow && - qworkspace->windowList().tqfind(lastActiveFormWindow) != -1) + qworkspace->windowList().find(lastActiveFormWindow) != -1) fw = lastActiveFormWindow; return fw; } @@ -1012,18 +1012,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge void MainWindow::setupRMBProperties(TQValueList<int> &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; @@ -1627,8 +1627,8 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) 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; TQString text; @@ -1706,9 +1706,9 @@ TQString MainWindow::documentationPath() const TQString result = docPath; if (docPath[0] == '$') { - int fs = docPath.tqfind('/'); + int fs = docPath.find('/'); if (fs == -1) - fs = docPath.tqfind('\\'); + fs = docPath.find('\\'); if (fs > -1) { result = docPath.mid(1, fs-1); @@ -1777,9 +1777,9 @@ void MainWindow::showDialogHelp() else if (w->inherits("DatabaseConnectionBase")) link += "dialog-edit-database-connections"; else if (w->inherits("FindDialog")) - link += "dialog-tqfind-text"; + link += "dialog-find-text"; else if (w->inherits("ReplaceDialog")) - link += "dialog-tqreplace-text"; + link += "dialog-replace-text"; else if (w->inherits("GotoLineDialog")) link += "dialog-go-to-line"; else if (w->inherits("ConnectionEditorBase")) diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp index 9ed36f59..356b4804 100644 --- a/kommander/editor/mainwindowactions.cpp +++ b/kommander/editor/mainwindowactions.cpp @@ -393,7 +393,7 @@ void MainWindow::setupToolActions() if (!fi->isFile() || fi->extension() != "kmdr") continue; TQString name = fi->baseName(); - name = name.tqreplace("_", " "); + name = name.replace("_", " "); editMenu->insertItem(name, TQT_TQOBJECT(this), TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count()); m_editorTools.append(fi->filePath()); } diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index 72f63de5..acf64cb9 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -110,7 +110,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; @@ -129,7 +129,7 @@ void MetaDataBase::removeEntry( TQObject *o ) void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) { 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() ); @@ -137,10 +137,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 ); } @@ -166,20 +166,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) { 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 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() ); @@ -193,7 +193,7 @@ TQStringList MetaDataBase::changedProperties( TQObject *o ) void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) { 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() ); @@ -206,20 +206,20 @@ void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, co TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) { 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->propertyComments.tqfind( property ); + return *r->propertyComments.find( property ); } void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) { 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() ); @@ -231,13 +231,13 @@ void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) { 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 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 ); @@ -247,7 +247,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() ); @@ -261,7 +261,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() ); @@ -282,7 +282,7 @@ int MetaDataBase::spacing( TQObject *o ) setupDataBase(); if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->tqfind( TQT_TQOBJECT(o) ); + MetaDataBaseRecord *r = db->find( TQT_TQOBJECT(o) ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); @@ -297,7 +297,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() ); @@ -320,7 +320,7 @@ int MetaDataBase::margin( TQObject *o ) setupDataBase(); if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) 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() ); @@ -334,7 +334,7 @@ void MetaDataBase::addConnection( 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() ); @@ -352,7 +352,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() ); @@ -374,7 +374,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr 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() ); @@ -387,7 +387,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() ); @@ -409,7 +409,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() ); @@ -430,7 +430,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() ); @@ -473,8 +473,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 ); @@ -485,7 +485,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& const TQString &access, const TQString &language, 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() ); @@ -498,7 +498,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& s.access = access; s.language = language; s.returnType = returnType; - TQValueList<MetaDataBase::Slot>::Iterator it = r->slotList.tqfind( s ); + TQValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s ); if ( it != r->slotList.end() ) r->slotList.remove( it ); r->slotList.append( s ); @@ -510,7 +510,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& void MetaDataBase::setSlotList( TQObject *o, const TQValueList<Slot> &slotList ) { 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() ); @@ -523,7 +523,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin const TQString &access, const TQString &language, 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() ); @@ -546,7 +546,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin void MetaDataBase::removeSlot( TQObject *o, const TQString &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() ); @@ -565,7 +565,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQString &slot ) TQValueList<MetaDataBase::Slot> 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() ); @@ -578,7 +578,7 @@ TQValueList<MetaDataBase::Slot> MetaDataBase::slotList( TQObject *o ) 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() ); @@ -596,7 +596,7 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName ) { 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() ); @@ -617,7 +617,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot, const TQString &language, 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() ); @@ -639,7 +639,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot, 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() ); @@ -648,13 +648,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 ( o->inherits( "FormWindow" ) ) { o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); slotList = o->tqmetaObject()->slotNames( true ); - if ( slotList.tqfind( slot ) != -1 ) + if ( slotList.find( slot ) != -1 ) return true; } @@ -682,7 +682,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom TQString MetaDataBase::languageOfSlot( 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() ); @@ -779,7 +779,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() ); @@ -792,7 +792,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() ); @@ -805,7 +805,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() ); @@ -818,7 +818,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() ); @@ -831,7 +831,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() ); @@ -844,7 +844,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() ); @@ -857,7 +857,7 @@ TQStringList MetaDataBase::forwards( TQObject *o ) 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() ); @@ -871,10 +871,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; @@ -890,7 +890,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() ); @@ -903,7 +903,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() ); @@ -916,7 +916,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() ); @@ -958,7 +958,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) { 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() ); @@ -971,7 +971,7 @@ void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) TQCursor MetaDataBase::cursor( TQWidget *w ) { setupDataBase(); - MetaDataBaseRecord *r = db->tqfind( (void*)w ); + MetaDataBaseRecord *r = db->find( (void*)w ); if ( !r ) { w->unsetCursor(); return w->cursor(); @@ -1007,7 +1007,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 ( normalizeSlot( *it ) == normalizeSlot( signal ) ) @@ -1019,7 +1019,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( normalizeSlot( slot ) ) != -1 ) + if ( slotList.find( normalizeSlot( slot ) ) != -1 ) return true; for ( TQValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { @@ -1032,7 +1032,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 ) { @@ -1047,7 +1047,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() ); @@ -1063,14 +1063,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 ) @@ -1078,7 +1078,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() ); @@ -1094,7 +1094,7 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) 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() ); @@ -1110,14 +1110,14 @@ TQString MetaDataBase::pixmapKey( 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->pixmapKeys.tqfind( pixmap ); + return *r->pixmapKeys.find( pixmap ); } void MetaDataBase::clearPixmapKeys( TQObject *o ) @@ -1125,7 +1125,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() ); @@ -1142,7 +1142,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() ); @@ -1157,7 +1157,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() ); @@ -1187,7 +1187,7 @@ void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯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() ); @@ -1202,7 +1202,7 @@ TQString MetaDataBase::exportMacro( 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() ); @@ -1214,6 +1214,6 @@ TQString MetaDataBase::exportMacro( TQObject *o ) bool MetaDataBase::hasObject( TQObject *o ) { - return !!db->tqfind( o ); + return !!db->find( o ); } diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp index e1ef5662..37e47e6a 100644 --- a/kommander/editor/newformimpl.cpp +++ b/kommander/editor/newformimpl.cpp @@ -100,12 +100,12 @@ static void unifyFormName(FormWindow *fw, TQWorkspace *qworkspace) if (w != fw) 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); fw->setCaption(n); @@ -173,7 +173,7 @@ NewForm::NewForm(TQWidget *tqparent, const TQString &templatePath) if (!fi->isFile() || fi->extension() != "kmdr") continue; TQString name = fi->baseName(); - name = name.tqreplace("_", " "); + name = name.replace("_", " "); CustomFormItem *ci = new CustomFormItem(templateView, name); allItems.append(ci); ci->setDragEnabled(false); diff --git a/kommander/editor/parser.cpp b/kommander/editor/parser.cpp index cbd3946a..fa264796 100644 --- a/kommander/editor/parser.cpp +++ b/kommander/editor/parser.cpp @@ -32,9 +32,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 ) { @@ -42,13 +42,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/kommander/editor/pics/images.h b/kommander/editor/pics/images.h index 4b14e2ac..57997088 100644 --- a/kommander/editor/pics/images.h +++ b/kommander/editor/pics/images.h @@ -10957,7 +10957,7 @@ static struct Embed { static const TQByteArray& qembed_findData( const char* name ) { static TQDict<TQByteArray> dict; - TQByteArray* ba = dict.tqfind( name ); + TQByteArray* ba = dict.find( name ); if ( !ba ) { for ( int i = 0; embed_vec[i].data; i++ ) { if ( strcmp(embed_vec[i].name, name) == 0 ) { diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp index f0e8ab3a..c94bf065 100644 --- a/kommander/editor/pixmapchooser.cpp +++ b/kommander/editor/pixmapchooser.cpp @@ -1016,7 +1016,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/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index d579c3b6..9d72fe02 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -548,7 +548,7 @@ void PropertyItem::setText( int col, const TQString &t ) { TQString txt( t ); if ( col == 1 ) - txt = txt.tqreplace( TQRegExp( "\n" ), " " ); + txt = txt.replace( TQRegExp( "\n" ), " " ); TQListViewItem::setText( col, txt ); } @@ -2534,10 +2534,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 ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) @@ -2693,7 +2693,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(); } @@ -2750,7 +2750,7 @@ void PropertyList::setupProperties() MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); if ( 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 ) ); @@ -3048,9 +3048,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" ); } @@ -3062,12 +3062,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 ); @@ -3075,7 +3075,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" ) { @@ -3235,7 +3235,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(); @@ -3363,7 +3363,7 @@ void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) if ( MetaDataBase::hasEvents( "C++" ) ) { #endif 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; @@ -3403,7 +3403,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) if ( MetaDataBase::hasEvents( "C++" ) ) { #endif 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; @@ -3491,7 +3491,7 @@ void EventList::renamed( TQListViewItem *i ) "C++", "void" ); #endif editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).tqfind( "(" ) ), + editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), #ifndef KOMMANDER editor->formWindow()->project()->language(), true ); #else @@ -3677,7 +3677,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/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp index 61d0407e..537216c5 100644 --- a/kommander/editor/qcompletionedit.cpp +++ b/kommander/editor/qcompletionedit.cpp @@ -154,7 +154,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(); } @@ -162,7 +162,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/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index f55c963c..c2ece48b 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -84,12 +84,12 @@ static TQString makeIndent( int indent ) static TQString entitize( const TQString &s, bool attribute = false ) { TQString s2 = s; - s2 = s2.tqreplace( TQRegExp( "&" ), "&" ); - s2 = s2.tqreplace( TQRegExp( ">" ), ">" ); - s2 = s2.tqreplace( TQRegExp( "<" ), "<" ); + s2 = s2.replace( TQRegExp( "&" ), "&" ); + s2 = s2.replace( TQRegExp( ">" ), ">" ); + s2 = s2.replace( TQRegExp( "<" ), "<" ); if ( attribute ) { - s2 = s2.tqreplace( TQRegExp( "\"" ), """ ); - s2 = s2.tqreplace( TQRegExp( "'" ), "'" ); + s2 = s2.replace( TQRegExp( "\"" ), """ ); + s2 = s2.replace( TQRegExp( "'" ), "'" ); } return s2; } @@ -181,7 +181,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) TQString content = stream.read(); if (content.startsWith("#!")) { - content = content.mid(content.tqfind('\n')); + content = content.mid(content.find('\n')); } if ( !doc.setContent( content) ) { // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); @@ -476,7 +476,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; } @@ -580,7 +580,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea const char* className = WidgetFactory::classNameOf( obj ); if ( obj->isA( "CustomWidget" ) ) usedCustomWidgets << TQString( className ); - 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; @@ -801,7 +801,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) if ( table->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !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; } @@ -984,9 +984,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { if ( w->inherits( "Spacer" ) ) { - if ( !changed.tqcontains( "tqsizeHint" ) ) + if ( !changed.contains( "tqsizeHint" ) ) changed << "tqsizeHint"; - if ( !changed.tqcontains( "geometry" ) ) + if ( !changed.contains( "geometry" ) ) changed << "geometry"; } } else if ( w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) { // #### should be cleaner (RS) @@ -994,9 +994,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"; } @@ -1008,13 +1008,13 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) TQStrList lst = w->tqmetaObject()->propertyNames( !w->inherits( "Spacer" ) ); 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 ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 && @@ -1066,7 +1066,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 ) { @@ -1079,7 +1079,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; } @@ -1090,7 +1090,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant int num, unum; double dob; TQString comment; - if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) ) + if ( w && formwindow->widgets()->find( (TQWidget*)w ) ) comment = MetaDataBase::propertyComment( w, name ); switch ( t ) { case TQVariant::String: @@ -1644,7 +1644,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 ( !obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { @@ -1920,9 +1920,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) ) && @@ -2080,7 +2080,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++; @@ -2214,7 +2214,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; } @@ -2547,9 +2547,9 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) for ( int i = 0; i < (int)mw->menuBar()->count(); ++i ) { ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) ) - << "\" name=\"" << entitize( mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl; + << "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl; indent++; - TQMenuItem *m = mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) ); + TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) ); if ( !m ) continue; TQPtrList<TQAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions(); @@ -2668,7 +2668,7 @@ void Resource::saveFormCode() for ( ; sit != slotList.end(); ++sit ) { MetaDataBase::Slot slot = *sit; TQMap<TQString, TQString>::Iterator it = - functionBodies.tqfind( MetaDataBase::normalizeSlot( (*sit).slot ) ); + functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) ); LanguageInterface::Function func; func.name = slot.slot; func.body = *it; @@ -2700,14 +2700,14 @@ void Resource::saveFormCode() static TQString make_function_pretty( const TQString &s ) { TQString res = s; - if ( res.tqfind( ")" ) - res.tqfind( "(" ) == 1 ) + if ( res.find( ")" ) - res.find( "(" ) == 1 ) return res; - res.tqreplace( TQRegExp( "[(]" ), "( " ); - res.tqreplace( TQRegExp( "[)]" ), " )" ); - res.tqreplace( TQRegExp( "&" ), " &" ); - res.tqreplace( TQRegExp( "[*]" ), " *" ); - res.tqreplace( TQRegExp( "," ), ", " ); - res.tqreplace( TQRegExp( ":" ), " : " ); + res.replace( TQRegExp( "[(]" ), "( " ); + res.replace( TQRegExp( "[)]" ), " )" ); + res.replace( TQRegExp( "&" ), " &" ); + res.replace( TQRegExp( "[*]" ), " *" ); + res.replace( TQRegExp( "," ), ", " ); + res.replace( TQRegExp( ":" ), " : " ); res = res.simplifyWhiteSpace(); return res; } @@ -2747,7 +2747,7 @@ void Resource::loadFunctions( const TQDomElement &e ) ( (*it).returnType.isEmpty() ? TQString( "void" ) : (*it).returnType ) ); - TQMap<TQString, TQString>::Iterator bit = bodies.tqfind( MetaDataBase::normalizeSlot( (*it).slot ) ); + TQMap<TQString, TQString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) ); if ( bit != bodies.end() ) code += "\n" + *bit + "\n\n"; else diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp index e5b39340..777fd874 100644 --- a/kommander/editor/tableeditorimpl.cpp +++ b/kommander/editor/tableeditorimpl.cpp @@ -132,11 +132,11 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) #ifndef TQT_NO_TABLE if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) { - 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 ); } @@ -208,7 +208,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 ); @@ -233,7 +233,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 ); @@ -302,7 +302,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 ) { @@ -392,7 +392,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/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp index 63f5c2d8..37c9672d 100644 --- a/kommander/editor/widgetdatabase.cpp +++ b/kommander/editor/widgetdatabase.cpp @@ -867,14 +867,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 @@ -883,7 +883,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 ) @@ -916,7 +916,7 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r ) TQString WidgetDatabase::widgetGroup( const TQString &g ) { - if ( wGroups->tqfind( g ) == -1 ) + if ( wGroups->find( g ) == -1 ) wGroups->append( g ); return g; } @@ -957,7 +957,7 @@ int WidgetDatabase::numWidgetGroups() bool WidgetDatabase::isGroupVisible( const TQString &g ) { setupDataBase( -1 ); - return invisibleGroups->tqfind( g ) == -1; + return invisibleGroups->find( g ) == -1; } int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 43011071..f33d27b3 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -232,7 +232,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; } @@ -241,7 +241,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++; } @@ -269,20 +269,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; } @@ -365,7 +365,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 ); } @@ -378,7 +378,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 ); } @@ -406,9 +406,9 @@ void WidgetFactory::saveDefaultProperties( TQWidget *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 ); } static void saveChangedProperties( TQWidget *w, int id ) @@ -512,7 +512,7 @@ bool EditorTabWidget::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; } @@ -521,7 +521,7 @@ bool EditorTabWidget::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++; } @@ -549,20 +549,20 @@ bool EditorTabWidget::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; } @@ -660,9 +660,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(w, id); - if (!changedProperties->tqcontains(id)) + if (!changedProperties->contains(id)) saveChangedProperties(w, id); return w; @@ -1530,7 +1530,7 @@ bool WidgetFactory::hasSpecialEditor( int id ) return true; if (className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING) return true; - if (className.tqcontains("Table")) + if (className.contains("Table")) return true; return false; @@ -1544,7 +1544,7 @@ bool WidgetFactory::hasItems( int id ) return true; if (className.mid(1) == "ListBox" || className.mid(1) == "ListView" || className.mid(1) == "IconView" || className.mid(1) == "ComboBox" || - className.tqcontains("Table")) + className.contains("Table")) return true; return false; @@ -1648,7 +1648,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget return; } #ifndef TQT_NO_TABLE - if (className.tqcontains("Table")) + if (className.contains("Table")) { TableEditor *e = new TableEditor(tqparent, editWidget, fw); e->exec(); @@ -1662,14 +1662,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 ); @@ -1696,13 +1696,13 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) return TQVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() ); } - 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" ) { diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h index 9ad4ce6c..178c3172 100644 --- a/kommander/editor/widgetfactory.h +++ b/kommander/editor/widgetfactory.h @@ -208,7 +208,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); } void reject() {} diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp index ecccce3d..971add70 100644 --- a/kommander/editor/workspace.cpp +++ b/kommander/editor/workspace.cpp @@ -755,7 +755,7 @@ void Workspace::bufferChosen( const TQString &buffer ) bufferEdit->setText( "" ); #ifndef KOMMANDER - if ( MainWindow::self->projectFileNames().tqcontains( buffer ) ) { + if ( MainWindow::self->projectFileNames().contains( buffer ) ) { MainWindow::self->setCurrentProjectByFilename( buffer ); return; } |