diff options
Diffstat (limited to 'src/kile/kiledocumentinfo.cpp')
-rw-r--r-- | src/kile/kiledocumentinfo.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/kile/kiledocumentinfo.cpp b/src/kile/kiledocumentinfo.cpp index 2689496..c886a47 100644 --- a/src/kile/kiledocumentinfo.cpp +++ b/src/kile/kiledocumentinfo.cpp @@ -87,7 +87,7 @@ namespace KileDocument bool Info::containsInvalidCharacters(const KURL& url) { TQString filename = url.fileName(); - return filename.tqcontains(" ") || filename.tqcontains("~") || filename.tqcontains("$") || filename.tqcontains("#"); + return filename.contains(" ") || filename.contains("~") || filename.contains("$") || filename.contains("#"); } KURL Info::repairInvalidCharacters(const KURL& url, bool checkForFileExistence /* = true */) @@ -133,7 +133,7 @@ KURL Info::repairExtension(const KURL& url, bool checkForFileExistence /* = true KURL ret(url); TQString filename = url.fileName(); - if(filename.tqcontains(".") && filename[0] != '.') // There already is an extension + if(filename.contains(".") && filename[0] != '.') // There already is an extension return ret; if(KMessageBox::Yes == KMessageBox::questionYesNo(NULL, @@ -343,7 +343,7 @@ void Info::count(const TQString line, long *stat) break; - case stComment : // if we get a selection the line possibly tqcontains \n and so the comment is only valid till \n and not necessarily till line.length() + case stComment : // if we get a selection the line possibly contains \n and so the comment is only valid till \n and not necessarily till line.length() if ( c == '\n') { ++stat[2]; // \n was counted as punctuation in the old implementation @@ -600,10 +600,10 @@ TQString TextInfo::getTextline(uint line, TodoResult &todo) else { //remove escaped \ characters - s.tqreplace("\\\\", " "); + s.replace("\\\\", " "); //remove comments - int pos = s.tqfind(reComments); + int pos = s.find(reComments); if ( pos != -1 ) { searchTodoComment(s,pos,todo); @@ -618,7 +618,7 @@ void TextInfo::searchTodoComment(const TQString &s, uint startpos, TodoResult &t { static TQRegExp reTodoComment("\\b(TODO|FIXME)\\b(:|\\s)?\\s*(.*)"); - if ( s.tqfind(reTodoComment,startpos) != -1 ) + if ( s.find(reTodoComment,startpos) != -1 ) { todo.type = ( reTodoComment.cap(1) == "TODO" ) ? KileStruct::ToDo : KileStruct::FixMe; todo.colTag = reTodoComment.pos(1); @@ -836,7 +836,7 @@ BracketResult LaTeXInfo::matchBracket(uint &l, uint &pos) int p = 0; while ( l < m_doc->numLines() ) { - if ( (p = getTextline(l,todo).tqfind('{', pos)) != -1 ) + if ( (p = getTextline(l,todo).find('{', pos)) != -1 ) { pos = p; break; @@ -911,12 +911,12 @@ void LaTeXInfo::updateStruct() continue; //ignore renewcommands - s.tqreplace(reReNewCommand, ""); + s.replace(reReNewCommand, ""); //find all commands in this line while (tagStart != -1) { - if ( (!foundBD) && ( (bd = s.tqfind(reBD, tagEnd)) != -1)) + if ( (!foundBD) && ( (bd = s.find(reBD, tagEnd)) != -1)) { KILE_DEBUG() << "\tfound \\begin{document}" << endl; foundBD = true; @@ -924,7 +924,7 @@ void LaTeXInfo::updateStruct() else m_preamble = m_doc->text(0, 0, i, bd); } - if ((!foundBD) && (s.tqfind(reRoot, tagEnd) != -1)) + if ((!foundBD) && (s.find(reRoot, tagEnd) != -1)) { KILE_DEBUG() << "\tsetting m_bIsRoot to true" << endl; tagEnd += reRoot.cap(0).length(); @@ -940,7 +940,7 @@ void LaTeXInfo::updateStruct() tagEnd = tagStart + reCommand.cap(0).length()-1; //look up the command in the dictionary - it = m_dictStructLevel.tqfind(reCommand.cap(1)); + it = m_dictStructLevel.find(reCommand.cap(1)); //if it is was a structure element, find the title (or label) if (it != m_dictStructLevel.end()) @@ -987,17 +987,17 @@ void LaTeXInfo::updateStruct() { if ( m=="figure" || m=="figure*" || m=="table" ) { - it = m_dictStructLevel.tqfind("\\begin{" + m +'}'); + it = m_dictStructLevel.find("\\begin{" + m +'}'); } else if ( m == "frame" ) { - it = m_dictStructLevel.tqfind("\\begin{frame}"); + it = m_dictStructLevel.find("\\begin{frame}"); m = i18n("Frame"); } else if ( m=="block" || m=="exampleblock" || m=="alertblock") { const TQString untitledBlockDisplayName = i18n("Untitled Block"); - it = m_dictStructLevel.tqfind("\\begin{block}"); + it = m_dictStructLevel.find("\\begin{block}"); if ( s.at(tagEnd+1) == '{' ) { tagEnd++; @@ -1019,11 +1019,11 @@ void LaTeXInfo::updateStruct() { if ( m=="figure" || m== "figure*" || m=="table") { - it = m_dictStructLevel.tqfind("\\end{float}"); + it = m_dictStructLevel.find("\\end{float}"); } else if ( m == "frame" ) { - it = m_dictStructLevel.tqfind("\\end{frame}"); + it = m_dictStructLevel.find("\\end{frame}"); } else fireSuspended = true; // only floats, no other environments @@ -1134,14 +1134,14 @@ void LaTeXInfo::updateStruct() TQString optArg, mandArgs; //find how many parameters this command takes - if ( s.tqfind(reNumOfParams, tagEnd + 1) != -1 ) + if ( s.find(reNumOfParams, tagEnd + 1) != -1 ) { bool ok; int noo = reNumOfParams.cap(1).toInt(&ok); if ( ok ) { - if(s.tqfind(reNumOfOptParams, tagEnd + 1) != -1) + if(s.find(reNumOfOptParams, tagEnd + 1) != -1) { KILE_DEBUG() << "Opt param is " << reNumOfOptParams.cap(2) << "%EOL" << endl; noo--; // if we have an opt argument, we have one mandatory argument less, and noo=0 can't occur because then latex complains (and we don't macht them with reNumOfParams either) @@ -1232,7 +1232,7 @@ void BibInfo::updateStruct() for(uint i = 0; i < m_doc->numLines(); ++i) { s = m_doc->textLine(i); - if ( (s.tqfind(reItem) != -1) && !reSpecial.exactMatch(reItem.cap(2).lower()) ) + if ( (s.find(reItem) != -1) && !reSpecial.exactMatch(reItem.cap(2).lower()) ) { KILE_DEBUG() << "found: " << reItem.cap(2) << endl; //start looking for key |