[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [okular] /: Removed useless Tile::operator=
From: Albert Astals Cid <tsdgeos () yahoo ! es>
Date: 2012-11-09 17:01:24
Message-ID: 1352480484.46060.YahooMailClassic () web171303 ! mail ! ir2 ! yahoo ! com
[Download RAW message or body]
Can you put it on the private side and without implementation to make sure the default = is not being used somewhere?
Cheers,
Albert
--- El vie, 9/11/12, Fabio D'Urso <fabiodurso@hotmail.it> escribió:
> De: Fabio D'Urso <fabiodurso@hotmail.it>
> Asunto: [okular] /: Removed useless Tile::operator=
> Para: kde-commits@kde.org
> Fecha: viernes, 9 de noviembre, 2012 17:50
> Git commit
> 85d5f043a2e60d9c098634752ef97eea6a9cfc77 by Fabio D'Urso.
> Committed on 09/11/2012 at 17:45.
> Pushed by fabiod into branch 'master'.
>
> Removed useless Tile::operator=
>
> M +0 -2 core/tile.h
> M +0
> -13 core/tilesmanager.cpp
> M +2 -2 ui/pagepainter.cpp
> M +3 -3 ui/pageview.cpp
>
> http://commits.kde.org/okular/85d5f043a2e60d9c098634752ef97eea6a9cfc77
>
> diff --git a/core/tile.h b/core/tile.h
> index 2e9a8a6..8ef780c 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 0cd34b2..ca1c0ff 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 74b034c..11d15ec 100644
> --- a/ui/pagepainter.cpp
> +++ b/ui/pagepainter.cpp
> @@ -249,7 +249,7 @@ void
> PagePainter::paintCroppedPageOnPainter( QPainter *
> destPainter, const Okula
>
> QList<Okular::Tile>::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<Okular::Tile>::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 2867731..61a52b3 100644
> --- a/ui/pageview.cpp
> +++ b/ui/pageview.cpp
> @@ -4133,7 +4133,7 @@ void
> PageView::slotRequestVisiblePixmaps( int newValue )
>
> QList<Okular::Tile>::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<Okular::Tile>::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<Okular::Tile>::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() )
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic