Reimplement Tile::operator=

QList requires its members to have an assignment operator
remotes/origin/KDE/4.10
Mailson Menezes 14 years ago
parent c460b0cd90
commit de565cdd2a
  1. 4
      core/tile.h
  2. 12
      core/tilesmanager.cpp

@ -42,11 +42,11 @@ class OKULAR_EXPORT Tile
*/
bool isValid() const;
Tile& operator=( const Tile &other );
private:
class Private;
Private * d;
Tile& operator=( const Tile &other ); // Not implemented
};
}

@ -613,6 +613,18 @@ Tile::Tile( const Tile &t )
d->isValid = t.d->isValid;
}
Tile& Tile::operator=( const Tile &other )
{
if ( this == &other )
return *this;
d->rect = other.d->rect;
d->pixmap = other.d->pixmap;
d->isValid = other.d->isValid;
return *this;
}
Tile::~Tile()
{
delete d;

Loading…
Cancel
Save