From cbb8e80154ccf8e18b8b2a77ed0141b6741c4d97 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 23 Mar 2006 19:02:55 +0000 Subject: [PATCH] some more compile changes, now let's see basketball svn path=/branches/work/kde4/playground/graphics/okular/; revision=521882 --- core/annotations.cpp | 4 ++-- core/annotations.h | 4 ++-- core/area.h | 2 +- shell/shell.cpp | 4 ++-- ui/pagepainter.cpp | 32 ++++++++++++++++---------------- ui/pagepainter.h | 2 +- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/core/annotations.cpp b/core/annotations.cpp index dbeeb52ef..dab73c1dd 100644 --- a/core/annotations.cpp +++ b/core/annotations.cpp @@ -633,7 +633,7 @@ void HighlightAnnotation::store( QDomNode & node, QDomDocument & document ) cons if ( highlightQuads.count() < 1 ) return; // append highlight quads, all children describe quads - QLinkedList< Quad >::const_iterator it = highlightQuads.begin(), end = highlightQuads.end(); + QList< Quad >::const_iterator it = highlightQuads.begin(), end = highlightQuads.end(); for ( ; it != end; ++it ) { QDomElement quadElement = document.createElement( "quad" ); @@ -765,7 +765,7 @@ void InkAnnotation::store( QDomNode & node, QDomDocument & document ) const // append the optional attributes if ( inkPaths.count() < 1 ) return; - QLinkedList< QLinkedList >::const_iterator pIt = inkPaths.begin(), pEnd = inkPaths.end(); + QList< QLinkedList >::const_iterator pIt = inkPaths.begin(), pEnd = inkPaths.end(); for ( ; pIt != pEnd; ++pIt ) { QDomElement pathElement = document.createElement( "path" ); diff --git a/core/annotations.h b/core/annotations.h index a70f38dd1..959dcec60 100644 --- a/core/annotations.h +++ b/core/annotations.h @@ -219,7 +219,7 @@ struct HighlightAnnotation : public Annotation bool capEnd; // false (vtx 2-3) [K] double feather; // 0.1 (in range 0..1) [K] }; - QLinkedList< Quad > highlightQuads; // not empty + QList< Quad > highlightQuads; // not empty }; struct StampAnnotation : public Annotation @@ -237,7 +237,7 @@ struct InkAnnotation : public Annotation AN_COMMONDECL( InkAnnotation, AInk ) // data fields - QLinkedList< QLinkedList > inkPaths; + QList< QLinkedList > inkPaths; }; #endif diff --git a/core/area.h b/core/area.h index 5f756e53f..6fc9b9e31 100644 --- a/core/area.h +++ b/core/area.h @@ -255,7 +255,7 @@ RegularArea::geometry( int xScale, int yScale, int dx, i QList* ret=new QList; Shape t; - foreach(const NormalizedShape ns, this) + foreach(const NormalizedShape ns, *this) { t=ns->geometry(xScale,yScale); t.moveBy(dx,dy); diff --git a/shell/shell.cpp b/shell/shell.cpp index b87ee3e13..f00173a44 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -126,8 +126,8 @@ void Shell::openURL( const KUrl & url ) if ( m_part ) { bool openOk = m_part->openURL( url ); - if ( openOk ) m_recent->addURL( url ); - else m_recent->removeURL( url ); + if ( openOk ) m_recent->addUrl( url ); + else m_recent->removeUrl( url ); m_printAction->setEnabled( openOk ); } } diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp index 578faea7a..5320ed64b 100644 --- a/ui/pagepainter.cpp +++ b/ui/pagepainter.cpp @@ -83,9 +83,9 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p // vectors containing objects to draw // make this a qcolor, rect map, since we dont need // to know s_id here! we are only drawing this right? - QValueList< QPair > * bufferedHighlights = 0; - QValueList< Annotation * > * bufferedAnnotations = 0; - QValueList< Annotation * > * unbufferedAnnotations = 0; + QList< QPair > * bufferedHighlights = 0; + QList< Annotation * > * bufferedAnnotations = 0; + QList< Annotation * > * unbufferedAnnotations = 0; // fill up lists with visible annotation/highlight objects if ( canDrawHighlights || canDrawAnnotations ) { @@ -98,13 +98,13 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p if ( canDrawHighlights ) { if ( !bufferedHighlights ) - bufferedHighlights = new QValueList< QPair >(); + bufferedHighlights = new QList< QPair >(); /* else {*/ NormalizedRect* limitRect = new NormalizedRect(nXMin, nYMin, nXMax, nYMax ); - QValueList< HighlightAreaRect * >::const_iterator h2It = page->m_highlights.begin(), hEnd = page->m_highlights.end(); - QValueList< NormalizedRect * >::const_iterator hIt; + QLinkedList< HighlightAreaRect * >::const_iterator h2It = page->m_highlights.begin(), hEnd = page->m_highlights.end(); + QList< NormalizedRect * >::const_iterator hIt; for ( ; h2It != hEnd; ++h2It ) for (hIt=(*h2It)->begin(); hIt!=(*h2It)->end(); ++hIt) { @@ -117,7 +117,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p // append annotations inside limits to the un/buffered list if ( canDrawAnnotations ) { - QValueList< Annotation * >::const_iterator aIt = page->m_annotations.begin(), aEnd = page->m_annotations.end(); + QLinkedList< Annotation * >::const_iterator aIt = page->m_annotations.begin(), aEnd = page->m_annotations.end(); for ( ; aIt != aEnd; ++aIt ) { Annotation * ann = *aIt; @@ -128,13 +128,13 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p type == Annotation::AInk /*|| (type == Annotation::AGeom && ann->style.opacity < 0.99)*/ ) { if ( !bufferedAnnotations ) - bufferedAnnotations = new QValueList< Annotation * >(); + bufferedAnnotations = new QList< Annotation * >(); bufferedAnnotations->append( ann ); } else { if ( !unbufferedAnnotations ) - unbufferedAnnotations = new QValueList< Annotation * >(); + unbufferedAnnotations = new QList< Annotation * >(); unbufferedAnnotations->append( ann ); } } @@ -160,7 +160,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p { QImage destImage; scalePixmapOnImage( destImage, pixmap, scaledWidth, scaledHeight, limits ); - destPainter->drawPixmap( limits.left(), limits.top(), destImage, 0, 0, + destPainter->drawImage( limits.left(), limits.top(), destImage, 0, 0, limits.width(),limits.height() ); } @@ -221,7 +221,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p if ( bufferedHighlights ) { // draw highlights that are inside the 'limits' paint region - QValueList< QPair >::const_iterator hIt = bufferedHighlights->begin(), hEnd = bufferedHighlights->end(); + QList< QPair >::const_iterator hIt = bufferedHighlights->begin(), hEnd = bufferedHighlights->end(); for ( ; hIt != hEnd; ++hIt ) { NormalizedRect * r = (*hIt).second; @@ -261,7 +261,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p yScale = (double)scaledHeight / (double)limits.height(); // paint all buffered annotations in the page - QValueList< Annotation * >::const_iterator aIt = bufferedAnnotations->begin(), aEnd = bufferedAnnotations->end(); + QList< Annotation * >::const_iterator aIt = bufferedAnnotations->begin(), aEnd = bufferedAnnotations->end(); for ( ; aIt != aEnd; ++aIt ) { Annotation * a = *aIt; @@ -365,10 +365,10 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p for ( int p = 0; p < paths; p++ ) { NormalizedPath path; - const QValueList & inkPath = ia->inkPaths[ p ]; + const QLinkedList & inkPath = ia->inkPaths[ p ]; // normalize page point to image - QValueList::const_iterator pIt = inkPath.begin(), pEnd = inkPath.end(); + QLinkedList::const_iterator pIt = inkPath.begin(), pEnd = inkPath.end(); for ( ; pIt != pEnd; ++pIt ) { const NormalizedPoint & inkPoint = *pIt; @@ -396,7 +396,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p if ( unbufferedAnnotations ) { // iterate over annotations and paint AText, AGeom, AStamp - QValueList< Annotation * >::const_iterator aIt = unbufferedAnnotations->begin(), aEnd = unbufferedAnnotations->end(); + QList< Annotation * >::const_iterator aIt = unbufferedAnnotations->begin(), aEnd = unbufferedAnnotations->end(); for ( ; aIt != aEnd; ++aIt ) { Annotation * a = *aIt; @@ -486,7 +486,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p QRect limitsEnlarged = limits; limitsEnlarged.addCoords( -2, -2, 2, 2 ); // draw rects that are inside the 'limits' paint region as opaque rects - QValueList< ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end(); + QLinkedList< ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end(); for ( ; lIt != lEnd; ++lIt ) { ObjectRect * rect = *lIt; diff --git a/ui/pagepainter.h b/ui/pagepainter.h index 543b0beb4..210d497a4 100644 --- a/ui/pagepainter.h +++ b/ui/pagepainter.h @@ -52,7 +52,7 @@ class PagePainter unsigned int alpha = 255 ); // my pretty dear raster function - typedef QValueList< NormalizedPoint > NormalizedPath; + typedef QList< NormalizedPoint > NormalizedPath; enum RasterOperation { Normal, Multiply }; static void drawShapeOnImage( QImage & image,