From da4be7880ff1de6415ab6256afd2514e64f5fa2e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: 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 --- kpdf/core/document.cpp | 20 ++++++++++---------- kpdf/core/generator_pdf/generator_pdf.cpp | 4 ++-- kpdf/core/page.cpp | 12 ++++++------ kpdf/core/page.h | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'kpdf/core') diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp index 6c918a4d..9062f976 100644 --- a/kpdf/core/document.cpp +++ b/kpdf/core/document.cpp @@ -145,7 +145,7 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con // determine the related "xml document-info" filename d->url = url; d->docFileName = docFile; - TQString fn = docFile.tqcontains('/') ? docFile.section('/', -1, -1) : docFile; + TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile; fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml"; fileReadTest.close(); d->xmlFileName = locateLocal( "data", fn ); @@ -298,7 +298,7 @@ void KPDFDocument::addObserver( DocumentObserver * pObserver ) void KPDFDocument::removeObserver( DocumentObserver * pObserver ) { // remove observer from the map. it won't receive notifications anymore - if ( d->observers.tqcontains( pObserver->observerId() ) ) + if ( d->observers.contains( pObserver->observerId() ) ) { // free observer's pixmap data int observerId = pObserver->observerId(); @@ -633,7 +633,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta return false; // if searchID search not recorded, create new descriptor and init params - if ( !d->searches.tqcontains( searchID ) ) + if ( !d->searches.contains( searchID ) ) { RunningSearch * search = new RunningSearch(); search->continueOnPage = -1; @@ -707,7 +707,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.tqcontains( pageNumber ) ) + if ( !pagesToNotify.contains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } @@ -779,7 +779,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta pages_vector[ currentPage ]->setHighlight( searchID, match, color ); // ..queue page for notifying changes.. - if ( !pagesToNotify.tqcontains( currentPage ) ) + if ( !pagesToNotify.contains( currentPage ) ) pagesToNotify.append( currentPage ); // ..move the viewport to show the searched word centered @@ -860,7 +860,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.tqcontains( pageNumber ) ) + if ( !pagesToNotify.contains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } @@ -884,7 +884,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta bool KPDFDocument::continueSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.tqcontains( searchID ) ) + if ( !d->searches.contains( searchID ) ) return false; // start search with cached parameters from last search by searchID @@ -897,7 +897,7 @@ bool KPDFDocument::continueSearch( int searchID ) void KPDFDocument::resetSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.tqcontains( searchID ) ) + if ( !d->searches.contains( searchID ) ) return; // get previous parameters for search @@ -1074,7 +1074,7 @@ void KPDFDocument::processLink( const KPDFLink * link ) TQString url = browse->url(); // fix for #100366, documents with relative links that are the form of http:foo.pdf - if (url.tqfind("http:") == 0 && url.tqfind("http://") == -1 && url.right(4) == ".pdf") + if (url.find("http:") == 0 && url.find("http://") == -1 && url.right(4) == ".pdf") { openRelativeFile(url.mid(5)); return; @@ -1117,7 +1117,7 @@ void KPDFDocument::requestDone( PixmapRequest * req ) break; } - if ( d->observers.tqcontains( req->id ) ) + if ( d->observers.contains( req->id ) ) { // [MEM] 1.2 append memory allocation descriptor to the FIFO int memoryBytes = 4 * req->width * req->height; diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp index 8ad34900..0a445a37 100644 --- a/kpdf/core/generator_pdf/generator_pdf.cpp +++ b/kpdf/core/generator_pdf/generator_pdf.cpp @@ -423,12 +423,12 @@ bool PDFGenerator::print( KPrinter& printer ) marginBottom = (int)printer.option("kde-margin-bottom").toDouble(); bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt(); - if (ps.tqfind(TQRegExp("w\\d+h\\d+")) == 0) + if (ps.find(TQRegExp("w\\d+h\\d+")) == 0) { // size not supported by TQt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester // remove the w ps = ps.mid(1); - int hPos = ps.tqfind("h"); + int hPos = ps.find("h"); paperWidth = ps.left(hPos).toInt(); paperHeight = ps.mid(hPos+1).toInt(); } diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp index 630c9480..269cab2e 100644 --- a/kpdf/core/page.cpp +++ b/kpdf/core/page.cpp @@ -74,7 +74,7 @@ void KPDFPage::setRotation( int r ) bool KPDFPage::hasPixmap( int id, int width, int height ) const { - if ( !m_pixmaps.tqcontains( id ) ) + if ( !m_pixmaps.contains( id ) ) return false; if ( width == -1 || height == -1 ) return true; @@ -98,7 +98,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const return false; TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->tqcontains( x, y ) ) + if ( (*it)->contains( x, y ) ) return true; return false; } @@ -190,7 +190,7 @@ const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, d { TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->tqcontains( x, y ) ) + if ( (*it)->contains( x, y ) ) if ((*it)->objectType() == type) return *it; return 0; } @@ -203,7 +203,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const void KPDFPage::setPixmap( int id, TQPixmap * pixmap ) { - if ( m_pixmaps.tqcontains( id ) ) + if ( m_pixmaps.contains( id ) ) delete m_pixmaps[id]; m_pixmaps[id] = pixmap; } @@ -252,7 +252,7 @@ void KPDFPage::setTransition( KPDFPageTransition * transition ) void KPDFPage::deletePixmap( int id ) { - if ( m_pixmaps.tqcontains( id ) ) + if ( m_pixmaps.contains( id ) ) { delete m_pixmaps[ id ]; m_pixmaps.remove( id ); @@ -304,7 +304,7 @@ NormalizedRect::NormalizedRect( const TQRect & r, double xScale, double yScale ) : left( (double)r.left() / xScale ), top( (double)r.top() / yScale ), right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {} -bool NormalizedRect::tqcontains( double x, double y ) const +bool NormalizedRect::contains( double x, double y ) const { return x >= left && x <= right && y >= top && y <= bottom; } diff --git a/kpdf/core/page.h b/kpdf/core/page.h index 51d7781c..1ec5add0 100644 --- a/kpdf/core/page.h +++ b/kpdf/core/page.h @@ -32,7 +32,7 @@ class NormalizedRect NormalizedRect( double l, double t, double r, double b ); NormalizedRect( const TQRect & r, double xScale, double yScale ); - bool tqcontains( double x, double y ) const; + bool contains( double x, double y ) const; bool intersects( const NormalizedRect & normRect ) const; bool intersects( double l, double t, double r, double b ) const; -- cgit v1.2.1