diff options
Diffstat (limited to 'kate')
-rw-r--r-- | kate/part/katearbitraryhighlight.cpp | 4 | ||||
-rw-r--r-- | kate/part/kateautoindent.cpp | 60 | ||||
-rw-r--r-- | kate/part/katebookmarks.cpp | 2 | ||||
-rw-r--r-- | kate/part/katecmds.cpp | 6 | ||||
-rw-r--r-- | kate/part/katecodefoldinghelpers.h | 2 | ||||
-rw-r--r-- | kate/part/katedialogs.cpp | 4 | ||||
-rw-r--r-- | kate/part/katedocument.cpp | 30 | ||||
-rw-r--r-- | kate/part/katefiletype.cpp | 14 | ||||
-rw-r--r-- | kate/part/katehighlight.cpp | 48 | ||||
-rw-r--r-- | kate/part/katehighlight.h | 2 | ||||
-rw-r--r-- | kate/part/kateprinter.cpp | 4 | ||||
-rw-r--r-- | kate/part/kateschema.cpp | 18 | ||||
-rw-r--r-- | kate/part/katesearch.cpp | 8 | ||||
-rw-r--r-- | kate/part/katespell.cpp | 2 | ||||
-rw-r--r-- | kate/part/katesupercursor.cpp | 2 | ||||
-rw-r--r-- | kate/part/katetextline.cpp | 4 | ||||
-rw-r--r-- | kate/part/kateview.cpp | 2 | ||||
-rw-r--r-- | kate/part/test_regression.cpp | 2 | ||||
-rw-r--r-- | kate/plugins/kdatatool/kate_kdatatool.cpp | 4 |
19 files changed, 109 insertions, 109 deletions
diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp index a1600b307..a9a4fe37c 100644 --- a/kate/part/katearbitraryhighlight.cpp +++ b/kate/part/katearbitraryhighlight.cpp @@ -90,7 +90,7 @@ void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateVi } void KateArbitraryHighlight::slotRangeListDeleted(TQObject* obj) { - int id=m_docHLs.tqfindRef(static_cast<KateSuperRangeList*>(obj)); + int id=m_docHLs.findRef(static_cast<KateSuperRangeList*>(obj)); if (id>=0) m_docHLs.take(id); for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) @@ -152,7 +152,7 @@ KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range) { for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next()) - if (l->tqcontains(range)) + if (l->contains(range)) return it.key(); // This must belong to a document-global highlight diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index 48c6b29c6..0aabde874 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -224,55 +224,55 @@ void KateNormalIndent::updateConfig () for (uint i=0; i<items.count(); i++) { TQString name = items.tqat(i)->name; - if (name.tqfind("Comment") != -1 && commentAttrib == 255) + if (name.find("Comment") != -1 && commentAttrib == 255) { commentAttrib = i; } - else if (name.tqfind("Region Marker") != -1 && regionAttrib == 255) + else if (name.find("Region Marker") != -1 && regionAttrib == 255) { regionAttrib = i; } - else if (name.tqfind("Symbol") != -1 && symbolAttrib == 255) + else if (name.find("Symbol") != -1 && symbolAttrib == 255) { symbolAttrib = i; } - else if (name.tqfind("Alert") != -1) + else if (name.find("Alert") != -1) { alertAttrib = i; } - else if (name.tqfind("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255) + else if (name.find("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255) { doxyCommentAttrib = i; } - else if (name.tqfind("Tags") != -1 && tagAttrib == 255) + else if (name.find("Tags") != -1 && tagAttrib == 255) { tagAttrib = i; } - else if (name.tqfind("Word") != -1 && wordAttrib == 255) + else if (name.find("Word") != -1 && wordAttrib == 255) { wordAttrib = i; } - else if (name.tqfind("Keyword") != -1 && keywordAttrib == 255) + else if (name.find("Keyword") != -1 && keywordAttrib == 255) { keywordAttrib = i; } - else if (name.tqfind("Normal") != -1 && normalAttrib == 255) + else if (name.find("Normal") != -1 && normalAttrib == 255) { normalAttrib = i; } - else if (name.tqfind("Extensions") != -1 && extensionAttrib == 255) + else if (name.find("Extensions") != -1 && extensionAttrib == 255) { extensionAttrib = i; } - else if (name.tqfind("Preprocessor") != -1 && preprocessorAttrib == 255) + else if (name.find("Preprocessor") != -1 && preprocessorAttrib == 255) { preprocessorAttrib = i; } - else if (name.tqfind("String") != -1 && stringAttrib == 255) + else if (name.find("String") != -1 && stringAttrib == 255) { stringAttrib = i; } - else if (name.tqfind("Char") != -1 && charAttrib == 255) + else if (name.find("Char") != -1 && charAttrib == 255) { charAttrib = i; } @@ -583,7 +583,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin) if (last <= 0 || !(justAfterDoxygen = textLine->stringAtPos(last-1, "*/"))) insideDoxygen = true; if (justAfterDoxygen) - justAfterDoxygen &= textLine->string().tqfind("/**") < 0; + justAfterDoxygen &= textLine->string().find("/**") < 0; while (textLine->attribute(first) != doxyCommentAttrib && first <= textLine->lastChar()) first++; if (textLine->stringAtPos(first, "//")) @@ -700,7 +700,7 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter, { const TQString txt = line->string(0,curCol); // do we have any significant preceding colon? - for (int pos = 0; (pos = txt.tqfind(':', pos)) >= 0; pos++) { + for (int pos = 0; (pos = txt.find(':', pos)) >= 0; pos++) { if (line->attribute(pos) == indenter.symbolAttrib) // yes, it has already contributed to this line's indentation, don't // indent again @@ -722,7 +722,7 @@ void KateCSmartIndent::processChar(TQChar c) static const TQString triggers("}{)/:#n"); static const TQString firstTriggers("}{)/:#"); static const TQString lastTriggers(":n"); - if (triggers.tqfind(c) < 0) + if (triggers.find(c) < 0) return; KateView *view = doc->activeView(); @@ -775,8 +775,8 @@ void KateCSmartIndent::processChar(TQChar c) // of the line const TQChar lastChar = textLine->getChar(textLine->lastChar()); int pos; - if (((c == firstChar && firstTriggers.tqfind(firstChar) >= 0) - || (c == lastChar && lastTriggers.tqfind(lastChar) >= 0)) + if (((c == firstChar && firstTriggers.find(firstChar) >= 0) + || (c == lastChar && lastTriggers.find(lastChar) >= 0)) && (c != ':' || colonPermitsReindent(*this, textLine, curCol))) processLine(begin); } @@ -1176,7 +1176,7 @@ uint KateCSmartIndent::findOpeningComment(KateDocCursor &start) { KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); - int pos = textLine->string().tqfind("/*", false); + int pos = textLine->string().find("/*", false); if (pos >= 0) { KateDocCursor temp(cur.line(), pos, doc); @@ -1359,7 +1359,7 @@ void KateXmlIndent::processChar (TQChar c) // only alter lines that start with a close element KateView *view = doc->activeView(); TQString text = doc->plainKateTextLine(view->cursorLine())->string(); - if(text.tqfind(startsWithCloseTag) == -1) return; + if(text.find(startsWithCloseTag) == -1) return; // process it processLine(view->cursorLine()); @@ -1404,7 +1404,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, // <a> // </a> <!-- indentation *already* decreased --> // requires that we discount the </a> from the number of closed tags - if(text.tqfind(startsWithCloseTag) != -1) ++numTags; + if(text.find(startsWithCloseTag) != -1) ++numTags; // count the number of open and close tags int lastCh = 0; @@ -1445,10 +1445,10 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, for(uint backLine = line; backLine; ) { // find first line with an open tag KateTextLine::Ptr x = doc->plainKateTextLine(--backLine); - if(x->string().tqfind('<') == -1) continue; + if(x->string().find('<') == -1) continue; // recalculate the indent - if(x->string().tqfind(unclosedDoctype) != -1) --numTags; + if(x->string().find(unclosedDoctype) != -1) --numTags; getLineInfo(backLine, prevIndent, numTags, attrCol, unclosedTag); break; } @@ -1499,7 +1499,7 @@ uint KateXmlIndent::processLine (uint line) if(indent < 0) indent = 0; // unindent lines that start with a close tag - if(kateLine->string().tqfind(startsWithCloseTag) != -1) { + if(kateLine->string().find(startsWithCloseTag) != -1) { indent -= indentWidth; } if(indent < 0) indent = 0; @@ -1606,7 +1606,7 @@ TQString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &st { KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); - int pos = textLine->string().tqfindRev("/*"); + int pos = textLine->string().findRev("/*"); // FIXME: /* inside /* is possible. This screws up in that case... if (pos >= 0) return initialWhitespace(textLine, pos); @@ -1760,7 +1760,7 @@ int KateCSAndSIndent::lastNonCommentChar( const KateDocCursor &line ) // find a possible start-of-comment int p = -2; // so the first find starts at position 0 - do p = str.tqfind( "//", p + 2 ); + do p = str.find( "//", p + 2 ); while ( p >= 0 && textLine->attribute(p) != commentAttrib && textLine->attribute(p) != doxyCommentAttrib ); // no // found? use whole string @@ -2112,7 +2112,7 @@ void KateCSAndSIndent::processChar(TQChar c) { // 'n' trigger is for c# regions. static const TQString triggers("}{)]/:;#n"); - if (triggers.tqfind(c) == -1) + if (triggers.find(c) == -1) return; // for historic reasons, processChar doesn't get a cursor @@ -2372,9 +2372,9 @@ void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &va { d->couples = 0; TQStringList l = TQStringList::split( " ", val ); - if ( l.tqcontains("parens") ) d->couples |= Parens; - if ( l.tqcontains("braces") ) d->couples |= Braces; - if ( l.tqcontains("brackets") ) d->couples |= Brackets; + if ( l.contains("parens") ) d->couples |= Parens; + if ( l.contains("braces") ) d->couples |= Braces; + if ( l.contains("brackets") ) d->couples |= Brackets; } else if ( var == "var-indent-couple-attribute" ) { diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index 2d1be2c20..6498d9936 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -176,7 +176,7 @@ void KateBookmarks::insertBookmarks( TQPopupMenu& menu ) { sortArray[i] = (*it)->line; ssort( sortArray, i ); - idx = sortArray.tqfind( (*it)->line ) + 3; + idx = sortArray.find( (*it)->line ) + 3; } menu.insertItem( diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp index 210d461a2..d4879cfda 100644 --- a/kate/part/katecmds.cpp +++ b/kate/part/katecmds.cpp @@ -303,7 +303,7 @@ static void replace(TQString &s, const TQString &needle, const TQString &with) int pos=0; while (1) { - pos=s.tqfind(needle, pos); + pos=s.find(needle, pos); if (pos==-1) break; s.replace(pos, needle.length(), with); pos+=with.length(); @@ -442,7 +442,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, // TODO if replace contains \n, // change the line number and // check for text that needs be searched behind the last inserted newline. - int lns = rep.tqcontains('\n'); + int lns = rep.contains('\n'); if ( lns ) { line += lns; @@ -451,7 +451,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, { // if ( endcol >= startcol + len ) endcol -= (startcol + len); - uint sc = rep.length() - rep.tqfindRev('\n') - 1; + uint sc = rep.length() - rep.findRev('\n') - 1; matches += sedMagic( doc, line, find, repOld, delim, noCase, repeat, sc, endcol ); } } diff --git a/kate/part/katecodefoldinghelpers.h b/kate/part/katecodefoldinghelpers.h index d90757986..7feee384e 100644 --- a/kate/part/katecodefoldinghelpers.h +++ b/kate/part/katecodefoldinghelpers.h @@ -79,7 +79,7 @@ class KateCodeFoldingNode inline KateCodeFoldingNode *child (uint index) const { return m_children[index]; } - inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.tqfind (node, start); } + inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.find (node, start); } inline void appendChild (KateCodeFoldingNode *node) { m_children.resize(m_children.size()+1); m_children[m_children.size()-1] = node; } diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 80a47cbe9..f9c5dadb1 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -1388,10 +1388,10 @@ void KateHlConfigPage::hlChanged(int z) return; } - if ( !hlDataDict.tqfind( z ) ) + if ( !hlDataDict.find( z ) ) hlDataDict.insert( z, hl->getData() ); - hlData = hlDataDict.tqfind( z ); + hlData = hlDataDict.find( z ); wildcards->setText(hlData->wildcards); mimetypes->setText(hlData->mimetypes); priority->setValue(hlData->priority); diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index cc6a462ac..dcbb5936c 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -1176,10 +1176,10 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str ) uint tw = config()->tabWidth(); int pos = 0; uint l = 0; - while ( (pos = s.tqfind('\t')) > -1 ) + while ( (pos = s.find('\t')) > -1 ) { l = tw - ( (col + pos)%tw ); - s.tqreplace( pos, 1, TQString().fill( ' ', l ) ); + s.replace( pos, 1, TQString().fill( ' ', l ) ); } } @@ -2151,12 +2151,12 @@ void KateDocument::clearMarks() void KateDocument::setPixmap( MarkInterface::MarkTypes type, const TQPixmap& pixmap ) { - m_markPixmaps.tqreplace( type, new TQPixmap( pixmap ) ); + m_markPixmaps.replace( type, new TQPixmap( pixmap ) ); } void KateDocument::setDescription( MarkInterface::MarkTypes type, const TQString& description ) { - m_markDescriptions.tqreplace( type, new TQString( description ) ); + m_markDescriptions.replace( type, new TQString( description ) ); } TQPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type ) @@ -2395,7 +2395,7 @@ bool KateDocument::openFile(KIO::Job * job) // service type magic to get encoding right // TQString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace(); - int pos = serviceType.tqfind(';'); + int pos = serviceType.find(';'); if (pos != -1) setEncoding (serviceType.mid(pos+1)); @@ -2934,7 +2934,7 @@ void KateDocument::removeSuperCursor(KateSuperCursor *cursor, bool privateC) { bool KateDocument::ownedView(KateView *view) { // do we own the given view? - return (m_views.tqcontainsRef(view) > 0); + return (m_views.containsRef(view) > 0); } bool KateDocument::isLastView(int numViews) { @@ -3232,7 +3232,7 @@ void KateDocument::paste ( KateView* view ) if (s.isEmpty()) return; - uint lines = s.tqcontains (TQChar ('\n')); + uint lines = s.contains (TQChar ('\n')); m_undoDontMerge = true; @@ -4634,7 +4634,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) { // simple check first, no regex // no kate inside, no vars, simple... - if (t.tqfind("kate") < 0) + if (t.find("kate") < 0) return; // found vars, if any @@ -4672,7 +4672,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) TQStringList types (TQStringList::split(';', kvLineMime.cap(1))); // no matching type found - if (!types.tqcontains (mimeType ())) + if (!types.contains (mimeType ())) return; s = kvLineMime.cap(2); @@ -4708,7 +4708,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) // only apply view & renderer config stuff if (onlyViewAndRenderer) { - if ( vvl.tqcontains( var ) ) // FIXME define above + if ( vvl.contains( var ) ) // FIXME define above setViewVariable( var, val ); } else @@ -4773,7 +4773,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) { TQStringList l; l << "unix" << "dos" << "mac"; - if ( (n = l.tqfindIndex( val.lower() )) != -1 ) + if ( (n = l.findIndex( val.lower() )) != -1 ) m_config->setEol( n ); } else if ( var == "encoding" ) @@ -4791,7 +4791,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) } // VIEW SETTINGS - else if ( vvl.tqcontains( var ) ) + else if ( vvl.contains( var ) ) setViewVariable( var, val ); else { @@ -4862,14 +4862,14 @@ bool KateDocument::checkBoolValue( TQString val, bool *result ) val = val.stripWhiteSpace().lower(); TQStringList l; l << "1" << "on" << "true"; - if ( l.tqcontains( val ) ) + if ( l.contains( val ) ) { *result = true; return true; } l.clear(); l << "0" << "off" << "false"; - if ( l.tqcontains( val ) ) + if ( l.contains( val ) ) { *result = false; return true; @@ -4893,7 +4893,7 @@ bool KateDocument::checkColorValue( TQString val, TQColor &c ) // KTextEditor::variable TQString KateDocument::variable( const TQString &name ) const { - if ( m_storedVariables.tqcontains( name ) ) + if ( m_storedVariables.contains( name ) ) return m_storedVariables[ name ]; return ""; diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index 461c6c994..c29b8641e 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -126,7 +126,7 @@ void KateFileTypeManager::save (TQPtrList<KateFileType> *v) for (uint z=0; z < g.count(); z++) { - if (newg.tqfindIndex (g[z]) == -1) + if (newg.findIndex (g[z]) == -1) config.deleteGroup (g[z]); } @@ -187,7 +187,7 @@ int KateFileTypeManager::fileType (KateDocument *doc) for (uint z=0; z < m_types.count(); z++) { - if (m_types.tqat(z)->mimetypes.tqfindIndex (mt->name()) > -1) + if (m_types.tqat(z)->mimetypes.findIndex (mt->name()) > -1) types.append (m_types.tqat(z)); } @@ -539,9 +539,9 @@ void KateViewFileTypeAction::slotAboutToShow() TQString hlName = KateFactory::self()->fileTypeManager()->list()->tqat(z)->name; TQString hlSection = KateFactory::self()->fileTypeManager()->list()->tqat(z)->section; - if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) ) + if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) { - if (subMenusName.tqcontains(hlSection) < 1) + if (subMenusName.contains(hlSection) < 1) { subMenusName << hlSection; TQPopupMenu *menu = new TQPopupMenu (); @@ -549,11 +549,11 @@ void KateViewFileTypeAction::slotAboutToShow() popupMenu()->insertItem (hlSection, menu); } - int m = subMenusName.tqfindIndex (hlSection); + int m = subMenusName.findIndex (hlSection); names << hlName; subMenus.tqat(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); } - else if (names.tqcontains(hlName) < 1) + else if (names.contains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); @@ -576,7 +576,7 @@ void KateViewFileTypeAction::slotAboutToShow() const KateFileType *t = 0; if ((t = KateFactory::self()->fileTypeManager()->fileType (doc->fileType()))) { - int i = subMenusName.tqfindIndex (t->section); + int i = subMenusName.findIndex (t->section); if (i >= 0 && subMenus.tqat(i)) subMenus.tqat(i)->setItemChecked (doc->fileType()+1, true); else diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index 3799f645d..7f5bcc882 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len) if (wordLen < minLen) return 0; - if ( dict[wordLen] && dict[wordLen]->tqfind(TQConstString(text.tqunicode() + offset, wordLen).string()) ) + if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.tqunicode() + offset, wordLen).string()) ) return offset2; return 0; @@ -1293,7 +1293,7 @@ int KateHighlighting::makeDynamicContext(KateHlContext *model, const TQStringLis QPair<KateHlContext *, TQString> key(model, args->front()); short value; - if (dynamicCtxs.tqcontains(key)) + if (dynamicCtxs.contains(key)) value = dynamicCtxs[key]; else { @@ -1931,12 +1931,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data, if (!beginRegionStr.isEmpty()) { - regionId = RegionList->tqfindIndex(beginRegionStr); + regionId = RegionList->findIndex(beginRegionStr); if (regionId==-1) // if the region name doesn't already exist, add it to the list { (*RegionList)<<beginRegionStr; - regionId = RegionList->tqfindIndex(beginRegionStr); + regionId = RegionList->findIndex(beginRegionStr); } regionId++; @@ -1946,12 +1946,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data, if (!endRegionStr.isEmpty()) { - regionId2 = RegionList->tqfindIndex(endRegionStr); + regionId2 = RegionList->findIndex(endRegionStr); if (regionId2==-1) // if the region name doesn't already exist, add it to the list { (*RegionList)<<endRegionStr; - regionId2 = RegionList->tqfindIndex(endRegionStr); + regionId2 = RegionList->findIndex(endRegionStr); } regionId2 = -regionId2 - 1; @@ -2088,14 +2088,14 @@ TQString KateHighlighting::hlKeyForAttrib( int i ) const bool KateHighlighting::isInWord( TQChar c, int attrib ) const { - return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.tqfind(c) < 0 + return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0 && !c.isSpace() && c != '"' && c != '\''; } bool KateHighlighting::canBreakAt( TQChar c, int attrib ) const { static const TQString& sq = KGlobal::staticQString("\"'"); - return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.tqfind(c) != -1) && (sq.tqfind(c) == -1); + return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.find(c) != -1) && (sq.find(c) == -1); } signed char KateHighlighting::commentRegion(int attr) const { @@ -2206,7 +2206,7 @@ void KateHighlighting::readGlobalKeywordConfig() // remove any weakDelimitars (if any) from the default list and store this list. for (uint s=0; s < weakDeliminator.length(); s++) { - int f = deliminator.tqfind (weakDeliminator[s]); + int f = deliminator.find (weakDeliminator[s]); if (f > -1) deliminator.remove (f, 1); @@ -2365,20 +2365,20 @@ int KateHighlighting::getIdFromString(TQStringList *ContextNameList, TQString tm } } - else if ( tmpLineEndContext.tqcontains("##")) + else if ( tmpLineEndContext.contains("##")) { - int o = tmpLineEndContext.tqfind("##"); + int o = tmpLineEndContext.find("##"); // FIXME at least with 'foo##bar'-style contexts the rules are picked up // but the default attribute is not TQString tmp=tmpLineEndContext.mid(o+2); - if (!embeddedHls.tqcontains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo()); + if (!embeddedHls.contains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo()); unres=tmp+':'+tmpLineEndContext.left(o); context=0; } else { - context=ContextNameList->tqfindIndex(buildPrefix+tmpLineEndContext); + context=ContextNameList->findIndex(buildPrefix+tmpLineEndContext); if (context==-1) { context=tmpLineEndContext.toInt(); @@ -2477,7 +2477,7 @@ void KateHighlighting::makeContextList() kdDebug(13010)<<"Looking up context0 for ruleset "<<incCtx<<endl; incCtx = incCtx.left(incCtx.length()-1); //try to find the context0 id for a given unresolvedReference - KateEmbeddedHlInfos::const_iterator hlIt=embeddedHls.tqfind(incCtx); + KateEmbeddedHlInfos::const_iterator hlIt=embeddedHls.find(incCtx); if (hlIt!=embeddedHls.end()) *(unresIt.key())=hlIt.data().context0; } @@ -2765,7 +2765,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) // only context refernces of type Name, ##Name, and Subname##Name are allowed if (incCtx.startsWith("##") || (!incCtx.startsWith("#"))) { - int incCtxi = incCtx.tqfind("##"); + int incCtxi = incCtx.find("##"); //#stay, #pop is not interesting here if (incCtxi >= 0) { @@ -2777,7 +2777,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) KateHlIncludeRule *ir=new KateHlIncludeRule(i,m_contexts[i]->items.count(),incCtxN,includeAttrib); //use the same way to determine cross hl file references as other items do - if (!embeddedHls.tqcontains(incSet)) + if (!embeddedHls.contains(incSet)) embeddedHls.insert(incSet,KateEmbeddedHlInfo()); else kdDebug(13010)<<"Skipping embeddedHls.insert for "<<incCtxN<<endl; @@ -2850,7 +2850,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) //BEGIN Resolve multiline region if possible if (!m_additionalData[ ident ]->multiLineRegion.isEmpty()) { - long commentregionid=RegionList.tqfindIndex( m_additionalData[ ident ]->multiLineRegion ); + long commentregionid=RegionList.findIndex( m_additionalData[ ident ]->multiLineRegion ); if (-1==commentregionid) { errorsAndWarnings+=i18n( "<B>%1</B>: Specified multiline comment region (%2) could not be resolved<BR>" @@ -3086,7 +3086,7 @@ int KateHlManager::realWildcardFind(const TQString &fileName) if (highlight->priority() > pri) { pri = highlight->priority(); - hl = hlList.tqfindRef (highlight); + hl = hlList.findRef (highlight); } } return hl; @@ -3124,7 +3124,7 @@ int KateHlManager::mimeFind( KateDocument *doc ) if (highlight->priority() > pri) { pri = highlight->priority(); - hl = hlList.tqfindRef (highlight); + hl = hlList.findRef (highlight); } } @@ -3421,9 +3421,9 @@ void KateViewHighlightAction::slotAboutToShow() if (!KateHlManager::self()->hlHidden(z)) { - if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) ) + if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) { - if (subMenusName.tqcontains(hlSection) < 1) + if (subMenusName.contains(hlSection) < 1) { subMenusName << hlSection; TQPopupMenu *menu = new TQPopupMenu (); @@ -3431,11 +3431,11 @@ void KateViewHighlightAction::slotAboutToShow() popupMenu()->insertItem ( '&' + hlSection, menu); } - int m = subMenusName.tqfindIndex (hlSection); + int m = subMenusName.findIndex (hlSection); names << hlName; subMenus.tqat(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); } - else if (names.tqcontains(hlName) < 1) + else if (names.contains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); @@ -3454,7 +3454,7 @@ void KateViewHighlightAction::slotAboutToShow() } popupMenu()->setItemChecked (0, false); - int i = subMenusName.tqfindIndex (KateHlManager::self()->hlSection(doc->hlMode())); + int i = subMenusName.findIndex (KateHlManager::self()->hlSection(doc->hlMode())); if (i >= 0 && subMenus.tqat(i)) subMenus.tqat(i)->setItemChecked (doc->hlMode(), true); else diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h index 9cb4a62c6..e312e4a01 100644 --- a/kate/part/katehighlight.h +++ b/kate/part/katehighlight.h @@ -357,7 +357,7 @@ class KateHlManager : public TQObject int detectHighlighting (class KateDocument *doc); - int findHl(KateHighlighting *h) {return hlList.tqfind(h);} + int findHl(KateHighlighting *h) {return hlList.find(h);} TQString identifierForName(const TQString&); // methodes to get the default style count + names diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 05f360497..837d773e5 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -425,7 +425,7 @@ bool KatePrinter::print (KateDocument *doc) for (int i=0; i<3; i++) { s = headerTagList[i]; - if (s.tqfind("%p") != -1) s.replace("%p", TQString::number(currentPage)); + if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage)); paint.drawText(marg, 0, headerWidth-(marg*2), headerHeight, align, s); align = valign|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight); } @@ -453,7 +453,7 @@ bool KatePrinter::print (KateDocument *doc) for (int i=0; i<3; i++) { s = footerTagList[i]; - if (s.tqfind("%p") != -1) s.replace("%p", TQString::number(currentPage)); + if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage)); paint.drawText(marg, maxHeight+innerMargin, headerWidth-(marg*2), footerHeight, align, s); align = Qt::AlignVCenter|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight); } diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 6b4f149fc..fb42ea72d 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -244,7 +244,7 @@ uint KateSchemaManager::number (const TQString &name) return 1; int i; - if ((i = m_schemas.tqfindIndex(name)) > -1) + if ((i = m_schemas.findIndex(name)) > -1) return i; return 0; @@ -416,7 +416,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema ) m_linenumber->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) ); // If we havent this schema, read in from config file - if ( ! m_schemas.tqcontains( newSchema ) ) + if ( ! m_schemas.contains( newSchema ) ) { // fallback defaults TQColor tmp0 (KGlobalSettings::baseColor()); @@ -746,7 +746,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) m_hlDict[m_schema]->setAutoDelete (true); } - if (!m_hlDict[m_schema]->tqfind(m_hl)) + if (!m_hlDict[m_schema]->find(m_hl)) { kdDebug(13030) << "NEW HL, create list" << endl; @@ -775,20 +775,20 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) m_styles->viewport()->setPalette( p ); TQDict<KateStyleListCaption> prefixes; - for ( KateHlItemData *itemData = m_hlDict[m_schema]->tqfind(m_hl)->last(); + for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last(); itemData != 0L; - itemData = m_hlDict[m_schema]->tqfind(m_hl)->prev()) + itemData = m_hlDict[m_schema]->find(m_hl)->prev()) { kdDebug(13030) << "insert items " << itemData->name << endl; // All stylenames have their language mode prefixed, e.g. HTML:Comment // split them and put them into nice substructures. - int c = itemData->name.tqfind(':'); + int c = itemData->name.find(':'); if ( c > 0 ) { TQString prefix = itemData->name.left(c); TQString name = itemData->name.mid(c+1); - KateStyleListCaption *parent = prefixes.tqfind( prefix ); + KateStyleListCaption *parent = prefixes.find( prefix ); if ( ! parent ) { parent = new KateStyleListCaption( m_styles, prefix ); @@ -969,7 +969,7 @@ void KateSchemaConfigPage::newSchema () // soft update, no load from disk KateFactory::self()->schemaManager()->update (false); - int i = KateFactory::self()->schemaManager()->list ().tqfindIndex (t); + int i = KateFactory::self()->schemaManager()->list ().findIndex (t); update (); if (i > -1) @@ -1021,7 +1021,7 @@ void KateViewSchemaAction::slotAboutToShow() { TQString hlName = KateFactory::self()->schemaManager()->list().operator[](z); - if (names.tqcontains(hlName) < 1) + if (names.contains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( hlName, this, TQT_SLOT(setSchema(int)), 0, z+1); diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index 951316671..5b3629347 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -81,7 +81,7 @@ void KateSearch::createActions( KActionCollection* ac ) void KateSearch::addToList( TQStringList& list, const TQString& s ) { if( list.count() > 0 ) { - TQStringList::Iterator it = list.tqfind( s ); + TQStringList::Iterator it = list.find( s ); if( *it != 0L ) list.remove( it ); if( list.count() >= 16 ) @@ -418,13 +418,13 @@ void KateSearch::replaceOne() replaces++; // if we inserted newlines, we better adjust. - uint newlines = replaceWith.tqcontains('\n'); + uint newlines = replaceWith.contains('\n'); if ( newlines ) { if ( ! s.flags.backward ) { s.cursor.setLine( s.cursor.line() + newlines ); - s.cursor.setCol( replaceWith.length() - replaceWith.tqfindRev('\n') ); + s.cursor.setCol( replaceWith.length() - replaceWith.findRev('\n') ); } // selection? if ( s.flags.selected ) @@ -851,7 +851,7 @@ bool SearchCommand::exec(class Kate::View *view, const TQString &cmd, TQString & // Else, it's just one or two (space separated) words TQRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)"); #define unbackslash(s) p=0;\ -while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\ +while ( (p = pattern.find( '\\' + delim, p )) > -1 )\ {\ if ( !p || pattern[p-1] != '\\' )\ pattern.remove( p, 1 );\ diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index 26134b9b2..6ce2b2a72 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -113,7 +113,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to << "ISO 8859-9" << "ISO 8859-13" << "ISO 8859-15" << "UTF-8" << "KOI8-R" << "KOI8-U" << "CP1251" << "CP1255"; - int enc = ksEncodings.tqfindIndex( m_view->doc()->encoding() ); + int enc = ksEncodings.findIndex( m_view->doc()->encoding() ); if ( enc > -1 ) { ksc->setEncoding( enc ); diff --git a/kate/part/katesupercursor.cpp b/kate/part/katesupercursor.cpp index 46e385e91..89860d496 100644 --- a/kate/part/katesupercursor.cpp +++ b/kate/part/katesupercursor.cpp @@ -662,7 +662,7 @@ void KateSuperRangeList::slotDeleted(TQObject* range) m_columnBoundaries.removeRef(r->m_end); } - int index = tqfindRef(r); + int index = findRef(r); if (index != -1) take(index); //else kdDebug(13020)<<"Range not found in list"<<endl; diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp index 687c54b9c..dbb827003 100644 --- a/kate/part/katetextline.cpp +++ b/kate/part/katetextline.cpp @@ -282,12 +282,12 @@ bool KateTextLine::searchText (uint startCol, const TQString &text, uint *foundA if ( col == (int) m_text.length() ) ++startCol; do { - index = m_text.tqfindRev( text, col, casesensitive ); + index = m_text.findRev( text, col, casesensitive ); col--; } while ( col >= 0 && l + index >= startCol ); } else - index = m_text.tqfind (text, startCol, casesensitive); + index = m_text.find (text, startCol, casesensitive); if (index > -1) { diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index cfe6288a7..a0310ecb5 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -1748,7 +1748,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T charAttributes = m_renderer->attribute(line->attribute(curPos)); - if ( ! stylecache.tqcontains( line->attribute(curPos) ) ) + if ( ! stylecache.contains( line->attribute(curPos) ) ) { TQString textdecoration; TQString style; diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index 9a2e88548..b20328c72 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -869,7 +869,7 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) int pos = 0; do { pos++; - int newpos = absBase.tqfind('/', pos); + int newpos = absBase.find('/', pos); if (newpos == -1) newpos = absBase.length(); TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index db28f8084..3678c26f4 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -108,7 +108,7 @@ void KDataToolPluginView::aboutToShow() if ( selectionInterface(m_view->document())->hasSelection() ) { word = selectionInterface(m_view->document())->selection(); - if ( word.tqfind(' ') == -1 && word.tqfind('\t') == -1 && word.tqfind('\n') == -1 ) + if ( word.find(' ') == -1 && word.find('\t') == -1 && word.find('\n') == -1 ) m_singleWord = true; else m_singleWord = false; @@ -206,7 +206,7 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const TQ TQString datatype = TQSTRING_OBJECT_NAME_STRING; // If unsupported (and if we have a single word indeed), try application/x-singleword - if ( !info.mimeTypes().tqcontains( mimetype ) && m_singleWord ) + if ( !info.mimeTypes().contains( mimetype ) && m_singleWord ) mimetype = "application/x-singleword"; kdDebug() << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl; |