From 85d5f043a2e60d9c098634752ef97eea6a9cfc77 Mon Sep 17 00:00:00 2001 From: Fabio D'Urso Date: Fri, 9 Nov 2012 17:45:46 +0100 Subject: [PATCH] Removed useless Tile::operator= --- core/tile.h | 2 -- core/tilesmanager.cpp | 13 ------------- ui/pagepainter.cpp | 4 ++-- ui/pageview.cpp | 6 +++--- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/core/tile.h b/core/tile.h index 2e9a8a6da..8ef780c7a 100644 --- a/core/tile.h +++ b/core/tile.h @@ -42,8 +42,6 @@ class OKULAR_EXPORT Tile */ bool isValid() const; - Tile & operator=( const Tile &t ); - private: class Private; Private * d; diff --git a/core/tilesmanager.cpp b/core/tilesmanager.cpp index 0cd34b2ef..ca1c0ffaf 100644 --- a/core/tilesmanager.cpp +++ b/core/tilesmanager.cpp @@ -613,19 +613,6 @@ Tile::Tile( const Tile &t ) d->isValid = t.d->isValid; } -Tile & Tile::operator=( const Tile &t ) -{ - if ( this == &t ) - return *this; - - d = new Tile::Private; - d->rect = t.d->rect; - d->pixmap = t.d->pixmap; - d->isValid = t.d->isValid; - - return *this; -} - Tile::~Tile() { delete d; diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp index 74b034cd1..11d15ec89 100644 --- a/ui/pagepainter.cpp +++ b/ui/pagepainter.cpp @@ -249,7 +249,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula QList::const_iterator tIt = tiles.constBegin(), tEnd = tiles.constEnd(); while ( tIt != tEnd ) { - Okular::Tile tile = *tIt; + const Okular::Tile &tile = *tIt; QRect tileRect = tile.rect().geometry( scaledWidth, scaledHeight ); QRect limitsInTile = limits & tileRect; if ( tile.pixmap() && !limitsInTile.isEmpty() ) @@ -305,7 +305,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula QList::const_iterator tIt = tiles.constBegin(), tEnd = tiles.constEnd(); while ( tIt != tEnd ) { - Okular::Tile tile = *tIt; + const Okular::Tile &tile = *tIt; QRect tileRect = tile.rect().geometry( scaledWidth, scaledHeight ); QRect limitsInTile = limits & tileRect; if ( tile.pixmap() && !limitsInTile.isEmpty() ) diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 2867731de..61a52b348 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -4133,7 +4133,7 @@ void PageView::slotRequestVisiblePixmaps( int newValue ) QList::const_iterator tIt = tiles.constBegin(), tEnd = tiles.constEnd(); while ( tIt != tEnd ) { - Okular::Tile tile = *tIt; + const Okular::Tile &tile = *tIt; if ( !tile.isValid() ) { if ( tilesRect.isNull() ) @@ -4211,7 +4211,7 @@ void PageView::slotRequestVisiblePixmaps( int newValue ) QList::const_iterator tIt = tiles.constBegin(), tEnd = tiles.constEnd(); while ( tIt != tEnd ) { - Okular::Tile tile = *tIt; + const Okular::Tile &tile = *tIt; if ( !tile.isValid() ) { if ( tilesRect.isNull() ) @@ -4259,7 +4259,7 @@ void PageView::slotRequestVisiblePixmaps( int newValue ) QList::const_iterator tIt = tiles.constBegin(), tEnd = tiles.constEnd(); while ( tIt != tEnd ) { - Okular::Tile tile = *tIt; + const Okular::Tile &tile = *tIt; if ( !tile.isValid() ) { if ( tilesRect.isNull() )