diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | da4be7880ff1de6415ab6256afd2514e64f5fa2e (patch) | |
tree | 0862c14883af0435b012f6f592221fc167ed7d91 /kdvi | |
parent | d0a269b9b0361bf71c5dd5787be0839f9dcace8c (diff) | |
download | tdegraphics-da4be7880ff1de6415ab6256afd2514e64f5fa2e.tar.gz tdegraphics-da4be7880ff1de6415ab6256afd2514e64f5fa2e.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdvi')
-rw-r--r-- | kdvi/dviFile.cpp | 2 | ||||
-rw-r--r-- | kdvi/dviRenderer.cpp | 28 | ||||
-rw-r--r-- | kdvi/dviRenderer_draw.cpp | 6 | ||||
-rw-r--r-- | kdvi/dviRenderer_export.cpp | 4 | ||||
-rw-r--r-- | kdvi/dviRenderer_prescan.cpp | 28 | ||||
-rw-r--r-- | kdvi/dviWidget.cpp | 4 | ||||
-rw-r--r-- | kdvi/examples/dvistd0.dvi | bin | 141242 -> 141240 bytes | |||
-rw-r--r-- | kdvi/fontEncoding.h | 2 | ||||
-rw-r--r-- | kdvi/fontEncodingPool.cpp | 2 | ||||
-rw-r--r-- | kdvi/fontMap.cpp | 10 | ||||
-rw-r--r-- | kdvi/fontMap.h | 2 | ||||
-rw-r--r-- | kdvi/fontpool.cpp | 14 | ||||
-rw-r--r-- | kdvi/infodialog.cpp | 10 | ||||
-rw-r--r-- | kdvi/kdvi_multipage.cpp | 4 | ||||
-rw-r--r-- | kdvi/main.cpp | 2 | ||||
-rw-r--r-- | kdvi/psgs.cpp | 26 | ||||
-rw-r--r-- | kdvi/special.cpp | 20 |
17 files changed, 82 insertions, 82 deletions
diff --git a/kdvi/dviFile.cpp b/kdvi/dviFile.cpp index db365482..33dc601d 100644 --- a/kdvi/dviFile.cpp +++ b/kdvi/dviFile.cpp @@ -362,7 +362,7 @@ void dvifile::renumber() TQString dvifile::convertPDFtoPS(const TQString &PDFFilename) { // Check if the PDFFile is known - TQMap<TQString, TQString>::Iterator it = convertedFiles.tqfind(PDFFilename); + TQMap<TQString, TQString>::Iterator it = convertedFiles.find(PDFFilename); if (it != convertedFiles.end()) { // PDF-File is known. Good. return it.data(); diff --git a/kdvi/dviRenderer.cpp b/kdvi/dviRenderer.cpp index 40463d36..7f21c65d 100644 --- a/kdvi/dviRenderer.cpp +++ b/kdvi/dviRenderer.cpp @@ -507,7 +507,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) TQString includePath; if (!baseURL.isLocalFile()) { includePath = filename; - includePath.truncate(includePath.tqfindRev('/')); + includePath.truncate(includePath.findRev('/')); } PS_interface->setIncludePath(includePath); @@ -629,7 +629,7 @@ Anchor dviRenderer::parseReference(const TQString &reference) // points to line number 1111 in the file "Filename". KDVI then // looks for source specials of the form "src:xxxxFilename", and // tries to find the special with the biggest xxxx - if (reference.tqfind("src:",0,false) == 0) { + if (reference.find("src:",0,false) == 0) { // Extract the file name and the numeral part from the reference string DVI_SourceFileSplitter splitter(reference, dviFile->filename); @@ -651,7 +651,7 @@ Anchor dviRenderer::parseReference(const TQString &reference) // whose line number is the biggest among those that are smaller // than the refLineNumber. That way, the position in the DVI file // which is highlighted is always a little further up than the - // position in the editor, e.g. if the DVI file tqcontains + // position in the editor, e.g. if the DVI file contains // positional information at the beginning of every paragraph, // KDVI jumps to the beginning of the paragraph that the cursor is // in, and never to the next paragraph. If source file anchors for @@ -756,7 +756,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum else return; } - command = command.tqreplace( "%l", TQString::number(splitter.line()) ).tqreplace( "%f", KShellProcess::quote(TeXfile) ); + command = command.replace( "%l", TQString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) ); #ifdef DEBUG_SPECIAL kdDebug(4300) << "Calling program: " << command << endl; @@ -810,27 +810,27 @@ TQString dviRenderer::PDFencodingToTQString(const TQString& _pdfstring) // replaces them by UTF8. See Section 3.2.3 of the PDF reference // guide for information. TQString pdfstring = _pdfstring; - pdfstring = pdfstring.tqreplace("\\n", "\n"); - pdfstring = pdfstring.tqreplace("\\r", "\n"); - pdfstring = pdfstring.tqreplace("\\t", "\t"); - pdfstring = pdfstring.tqreplace("\\f", "\f"); - pdfstring = pdfstring.tqreplace("\\(", "("); - pdfstring = pdfstring.tqreplace("\\)", ")"); - pdfstring = pdfstring.tqreplace("\\\\", "\\"); + pdfstring = pdfstring.replace("\\n", "\n"); + pdfstring = pdfstring.replace("\\r", "\n"); + pdfstring = pdfstring.replace("\\t", "\t"); + pdfstring = pdfstring.replace("\\f", "\f"); + pdfstring = pdfstring.replace("\\(", "("); + pdfstring = pdfstring.replace("\\)", ")"); + pdfstring = pdfstring.replace("\\\\", "\\"); // Now replace octal character codes with the characters they encode int pos; TQRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d\\d)" ); // matches "\xy" where x,y are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.tqreplace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.replace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d)" ); // matches "\x" where x is a number while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } return pdfstring; } diff --git a/kdvi/dviRenderer_draw.cpp b/kdvi/dviRenderer_draw.cpp index af79b09a..2031fcd7 100644 --- a/kdvi/dviRenderer_draw.cpp +++ b/kdvi/dviRenderer_draw.cpp @@ -290,7 +290,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) (this->*currinf.set_char_p)(ch, ch); } else if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; @@ -511,7 +511,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case FNT1: case FNT2: case FNT3: - currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; @@ -520,7 +520,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) break; case FNT4: - currinf.fontp = currinf.fonttable->tqfind(readINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->find(readINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; diff --git a/kdvi/dviRenderer_export.cpp b/kdvi/dviRenderer_export.cpp index d23a15ce..110aaacb 100644 --- a/kdvi/dviRenderer_export.cpp +++ b/kdvi/dviRenderer_export.cpp @@ -94,7 +94,7 @@ void dviRenderer::exportPDF() // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf"; + suggestedName = suggestedName.left(suggestedName.find(".")) + ".pdf"; TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), parentWidget, i18n("Export File As")); if (fileName.isEmpty()) @@ -193,7 +193,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin if (fname.isEmpty()) { // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps"; + suggestedName = suggestedName.left(suggestedName.find(".")) + ".ps"; fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As")); if (fileName.isEmpty()) diff --git a/kdvi/dviRenderer_prescan.cpp b/kdvi/dviRenderer_prescan.cpp index 5ed49ebc..7cfd2415 100644 --- a/kdvi/dviRenderer_prescan.cpp +++ b/kdvi/dviRenderer_prescan.cpp @@ -60,7 +60,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.tqfind(' ')); + EPSfilename.truncate(EPSfilename.find(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -118,7 +118,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.tqfind(' ')); + include_command = include_command.mid(include_command.find(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -128,7 +128,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise // Generate the PostScript commands to be included TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); @@ -271,7 +271,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp) void dviRenderer::prescan_ParseHTMLAnchorSpecial(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.tqfind('"')); + cp.truncate(cp.find('"')); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[cp] = Anchor(current_page+1, l); @@ -355,14 +355,14 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) if (cp.startsWith("ps:SDict begin /product where{pop product(Distiller)")) return; // hyperref tries to work around Distiller bug if (cp.startsWith("ps:SDict begin [") && cp.endsWith(" pdfmark end")) { // hyperref definition of link/anchor/bookmark/etc - if (cp.tqcontains("/DEST")) { // The PostScript code defines an anchor + if (cp.contains("/DEST")) { // The PostScript code defines an anchor TQString anchorName = cp.section('(', 1, 1).section(')', 0, 0); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[anchorName] = Anchor(current_page+1, l); } // The PostScript code defines a bookmark - if (cp.tqcontains("/Dest") && cp.tqcontains("/Title")) + if (cp.contains("/Dest") && cp.contains("/Title")) prebookmarks.append(PreBookmark(PDFencodingToTQString(cp.section('(', 2, 2).section(')', 0, 0)), cp.section('(', 1, 1).section(')', 0, 0), cp.section('-', 1, 1).section(' ', 0, 0).toUInt() @@ -374,14 +374,14 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - if (cp.tqfind("ps::[begin]", 0, false) == 0) { + if (cp.find("ps::[begin]", 0, false) == 0) { PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(11)) ); } else { - if (cp.tqfind("ps::[end]", 0, false) == 0) { + if (cp.find("ps::[end]", 0, false) == 0) { PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(9)) ); } else { - if (cp.tqfind("ps::", 0, false) == 0) { + if (cp.find("ps::", 0, false) == 0) { PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(4)) ); } else { PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); @@ -406,7 +406,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.tqfind(' ')); + EPSfilename.truncate(EPSfilename.find(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -444,7 +444,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.tqfind(' ')); + include_command = include_command.mid(include_command.find(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -454,7 +454,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise if (TQFile::exists(EPSfilename)) { double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; @@ -631,7 +631,7 @@ void dviRenderer::prescan(parseSpecials specialParser) } if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; @@ -750,7 +750,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case FNT2: case FNT3: case FNT4: - currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) return; currinf.set_char_p = currinf.fontp->set_char_p; diff --git a/kdvi/dviWidget.cpp b/kdvi/dviWidget.cpp index 321f0f57..68f4b124 100644 --- a/kdvi/dviWidget.cpp +++ b/kdvi/dviWidget.cpp @@ -53,7 +53,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) for(unsigned int i=0; i<pageData->sourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) + if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) { emit(SRCLink(pageData->sourceHyperLinkList[i].linkText, e, this)); e->accept(); @@ -99,7 +99,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e) // Check if the cursor hovers over a sourceHyperlink. for(unsigned int i=0; i<pageData->sourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) { + if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) { clearStatusBarTimer.stop(); // The macro-package srcltx gives a special like "src:99 test.tex" diff --git a/kdvi/examples/dvistd0.dvi b/kdvi/examples/dvistd0.dvi Binary files differindex 654b617b..ef73e604 100644 --- a/kdvi/examples/dvistd0.dvi +++ b/kdvi/examples/dvistd0.dvi diff --git a/kdvi/fontEncoding.h b/kdvi/fontEncoding.h index b70cfdc5..95eb4dd0 100644 --- a/kdvi/fontEncoding.h +++ b/kdvi/fontEncoding.h @@ -48,7 +48,7 @@ * a different name and with a different encoding ---the map file * (fontMap.h) can probably see to that. * - * Summing up: this class tqcontains 256 glyph names read from an + * Summing up: this class contains 256 glyph names read from an * encoding file during the construction of this class. * * @author Stefan Kebekus <[email protected]> diff --git a/kdvi/fontEncodingPool.cpp b/kdvi/fontEncodingPool.cpp index 4c00256f..59b38167 100644 --- a/kdvi/fontEncodingPool.cpp +++ b/kdvi/fontEncodingPool.cpp @@ -18,7 +18,7 @@ fontEncodingPool::fontEncodingPool() fontEncoding *fontEncodingPool::findByName(const TQString &name) { - fontEncoding *ptr = dictionary.tqfind( name ); + fontEncoding *ptr = dictionary.find( name ); if (ptr == 0) { ptr = new fontEncoding(name); diff --git a/kdvi/fontMap.cpp b/kdvi/fontMap.cpp index b285018b..7dec6f4f 100644 --- a/kdvi/fontMap.cpp +++ b/kdvi/fontMap.cpp @@ -78,7 +78,7 @@ fontMap::fontMap() encodingName = encodingName.mid(1); double slant = 0.0; - int i = line.tqfind("SlantFont"); + int i = line.find("SlantFont"); if (i >= 0) { bool ok; slant = line.left(i).section(' ', -1, -1 ,TQString::SectionSkipEmpty).toDouble(&ok); @@ -115,7 +115,7 @@ fontMap::fontMap() const TQString &fontMap::findFileName(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().fontFileName; @@ -126,7 +126,7 @@ const TQString &fontMap::findFileName(const TQString &TeXName) const TQString &fontMap::findFontName(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().fullFontName; @@ -137,7 +137,7 @@ const TQString &fontMap::findFontName(const TQString &TeXName) const TQString &fontMap::findEncoding(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().fontEncoding; @@ -148,7 +148,7 @@ const TQString &fontMap::findEncoding(const TQString &TeXName) double fontMap::findSlant(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().slant; diff --git a/kdvi/fontMap.h b/kdvi/fontMap.h index 6a719ea6..da80b72a 100644 --- a/kdvi/fontMap.h +++ b/kdvi/fontMap.h @@ -13,7 +13,7 @@ #include <tqstring.h> /** - * This class represents one line of a font map file, and tqcontains + * This class represents one line of a font map file, and contains * three pieces of information about a font: its file name, the full * name of the font, and the encoding. * diff --git a/kdvi/fontpool.cpp b/kdvi/fontpool.cpp index 17bc4a3d..8cd35df7 100644 --- a/kdvi/fontpool.cpp +++ b/kdvi/fontpool.cpp @@ -46,7 +46,7 @@ fontPool::fontPool() i18n( "KDVI is currently generating bitmap fonts..." ), i18n( "Aborts the font generation. Don't do this." ), i18n( "KDVI is currently generating bitmap fonts which are needed to display your document. " - "For this, KDVI uses a number of external programs, such as MetaFont. You can tqfind " + "For this, KDVI uses a number of external programs, such as MetaFont. You can find " "the output of these programs later in the document info dialog." ), i18n( "KDVI is generating fonts. Please wait." ), 0 ) @@ -558,32 +558,32 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen) // We'd like to print only full lines of text. int numleft; bool show_prog = false; - while( (numleft = MetafontOutput.tqfind('\n')) != -1) { + while( (numleft = MetafontOutput.find('\n')) != -1) { TQString line = MetafontOutput.left(numleft+1); #ifdef DEBUG_FONTPOOL kdDebug(4300) << "MF OUTPUT RECEIVED: " << line; #endif // Search for a line which marks the beginning of a MetaFont run // and show the progress dialog at the end of this method. - if (line.tqfind("kpathsea:") == 0) + if (line.find("kpathsea:") == 0) show_prog = true; // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and update the display // accordingly. - int startlineindex = line.tqfind("kpathsea:"); + int startlineindex = line.find("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.tqfind("\n",startlineindex); + int endstartline = line.find("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); // The last word in the startline is the name of the font which we // are generating. The second-to-last word is the resolution in // dots per inch. Display this info in the text label below the // progress bar. - int lastblank = startLine.tqfindRev(' '); + int lastblank = startLine.findRev(' '); TQString fontName = startLine.mid(lastblank+1); - int secondblank = startLine.tqfindRev(' ',lastblank-1); + int secondblank = startLine.findRev(' ',lastblank-1); TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1); progress.show(); diff --git a/kdvi/infodialog.cpp b/kdvi/infodialog.cpp index b287a390..3e2bbf16 100644 --- a/kdvi/infodialog.cpp +++ b/kdvi/infodialog.cpp @@ -89,7 +89,7 @@ void infoDialog::setFontInfo(fontPool *fp) void infoDialog::outputReceiver(const TQString& _op) { TQString op = _op; - op = op.tqreplace( TQRegExp("<"), "<" ); + op = op.replace( TQRegExp("<"), "<" ); if (MFOutputReceived == false) { TextLabel3->setText("<b>"+headline+"</b><br>"); @@ -99,7 +99,7 @@ void infoDialog::outputReceiver(const TQString& _op) // It seems that the TQTextView wants that we append only full lines. // We see to that. pool = pool+op; - int idx = pool.tqfindRev("\n"); + int idx = pool.findRev("\n"); while(idx != -1) { TQString line = pool.left(idx); @@ -108,9 +108,9 @@ void infoDialog::outputReceiver(const TQString& _op) // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and print them in boldface. - int startlineindex = line.tqfind("kpathsea:"); + int startlineindex = line.find("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.tqfind("\n",startlineindex); + int endstartline = line.find("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); if (MFOutputReceived) TextLabel3->append("<hr>\n<b>"+startLine+"</b>"); @@ -119,7 +119,7 @@ void infoDialog::outputReceiver(const TQString& _op) TextLabel3->append(line.mid(endstartline)); } else TextLabel3->append(line); - idx = pool.tqfindRev("\n"); + idx = pool.findRev("\n"); } MFOutputReceived = true; diff --git a/kdvi/kdvi_multipage.cpp b/kdvi/kdvi_multipage.cpp index 9fc5703d..bceacddc 100644 --- a/kdvi/kdvi_multipage.cpp +++ b/kdvi/kdvi_multipage.cpp @@ -141,7 +141,7 @@ void KDVIMultiPage::slotSave() // Try to guess the proper ending... TQString formats; TQString ending; - int rindex = m_file.tqfindRev("."); + int rindex = m_file.findRev("."); if (rindex == -1) { ending = TQString(); formats = TQString(); @@ -157,7 +157,7 @@ void KDVIMultiPage::slotSave() // Add the ending to the filename. I hope the user likes it that // way. - if (!ending.isEmpty() && fileName.tqfind(ending) == -1) + if (!ending.isEmpty() && fileName.find(ending) == -1) fileName = fileName+ending; if (TQFile(fileName).exists()) { diff --git a/kdvi/main.cpp b/kdvi/main.cpp index 50221ebe..f10501bd 100644 --- a/kdvi/main.cpp +++ b/kdvi/main.cpp @@ -98,7 +98,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).tqfind("kviewshell") == 0) + if ((*it).find("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kdvi/psgs.cpp b/kdvi/psgs.cpp index 31f9bfdc..9f1f925f 100644 --- a/kdvi/psgs.cpp +++ b/kdvi/psgs.cpp @@ -64,14 +64,14 @@ void ghostscript_interface::setPostScript(const PageNumber& page, const TQString kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; #endif - if (pageList.tqfind(page) == 0) { + if (pageList.find(page) == 0) { pageInfo *info = new pageInfo(PostScript); // Check if dict is big enough if (pageList.count() > pageList.size() -2) pageList.resize(pageList.size()*2); pageList.insert(page, info); } else - *(pageList.tqfind(page)->PostScriptString) = PostScript; + *(pageList.find(page)->PostScriptString) = PostScript; } @@ -88,7 +88,7 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC kdDebug(4300) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl; #endif - if (pageList.tqfind(page) == 0) { + if (pageList.find(page) == 0) { pageInfo *info = new pageInfo(TQString()); info->background = background_color; if (permanent) @@ -98,9 +98,9 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC pageList.resize(pageList.size()*2); pageList.insert(page, info); } else { - pageList.tqfind(page)->background = background_color; + pageList.find(page)->background = background_color; if (permanent) - pageList.tqfind(page)->permanentBackground = background_color; + pageList.find(page)->permanentBackground = background_color; } } @@ -109,10 +109,10 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page) #ifdef DEBUG_PSGS kdDebug(4300) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl; #endif - if (pageList.tqfind(page) == 0) + if (pageList.find(page) == 0) return; - pageInfo *info = pageList.tqfind(page); + pageInfo *info = pageList.find(page); info->background = info->permanentBackground; } @@ -124,10 +124,10 @@ TQColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const kdDebug(4300) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl; #endif - if (pageList.tqfind(page) == 0) + if (pageList.find(page) == 0) return TQt::white; else - return pageList.tqfind(page)->background; + return pageList.find(page)->background; } @@ -151,7 +151,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co emit(setStatusBarText(i18n("Generating PostScript graphics..."))); - pageInfo *info = pageList.tqfind(page); + pageInfo *info = pageList.find(page); // Generate a PNG-file // Step 1: Write the PostScriptString to a File @@ -239,7 +239,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co // ghostscript. If so, try again with another device. TQString GSoutput; while(proc.readln(GSoutput) != -1) { - if (GSoutput.tqcontains("Unknown device")) { + if (GSoutput.contains("Unknown device")) { kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support " "the '%1' ghostview device driver.").tqarg(*gsDevice) << endl; knownDevices.remove(gsDevice); @@ -293,7 +293,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma pixel_page_w = paint->viewport().width(); pixel_page_h = paint->viewport().height(); - pageInfo *info = pageList.tqfind(page); + pageInfo *info = pageList.find(page); // No PostScript? Then return immediately. if ((info == 0) || (info->PostScriptString->isEmpty())) { @@ -317,7 +317,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KURL &base) { - // If the base URL indicates that the DVI file is local, try to tqfind + // If the base URL indicates that the DVI file is local, try to find // the graphics file in the directory where the DVI file resides if (base.isLocalFile()) { TQString path = base.path(); // -> "/bar/foo.dvi" diff --git a/kdvi/special.cpp b/kdvi/special.cpp index 5bd082cb..918b7352 100644 --- a/kdvi/special.cpp +++ b/kdvi/special.cpp @@ -120,7 +120,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) TQString specType = colorSpec.section(' ', 0, 0); - if (specType.tqfind("rgb", false) == 0) { + if (specType.find("rgb", false) == 0) { bool ok; double r = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -138,7 +138,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.tqfind("hsb", false) == 0) { + if (specType.find("hsb", false) == 0) { bool ok; double h = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -156,7 +156,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), TQColor::Hsv); } - if (specType.tqfind("cmyk", false) == 0) { + if (specType.find("cmyk", false) == 0) { bool ok; double c = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -189,7 +189,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.tqfind("gray", false) == 0) { + if (specType.find("gray", false) == 0) { bool ok; double g = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -200,7 +200,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) } // Check if the color is one of the known named colors. - TQMap<TQString, TQColor>::Iterator f = namedColors.tqfind(specType); + TQMap<TQString, TQColor>::Iterator f = namedColors.find(specType); if (f != namedColors.end()) return *f; @@ -254,7 +254,7 @@ void dviRenderer::color_special(const TQString& _cp) void dviRenderer::html_href_special(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.tqfind('"')); + cp.truncate(cp.find('"')); #ifdef DEBUG_SPECIAL kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl; @@ -292,10 +292,10 @@ void dviRenderer::source_special(const TQString& cp) void parse_special_argument(const TQString& strg, const char* argument_name, int* variable) { - int index = strg.tqfind(argument_name); + int index = strg.find(argument_name); if (index >= 0) { TQString tmp = strg.mid(index + strlen(argument_name)); - index = tmp.tqfind(' '); + index = tmp.find(' '); if (index >= 0) tmp.truncate(index); @@ -327,7 +327,7 @@ void dviRenderer::epsf_special(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename_orig = include_command; - EPSfilename_orig.truncate(EPSfilename_orig.tqfind(' ')); + EPSfilename_orig.truncate(EPSfilename_orig.find(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -348,7 +348,7 @@ void dviRenderer::epsf_special(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.tqfind(' ')); + include_command = include_command.mid(include_command.find(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); |