This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/5617/ |
On October 26th, 2010, 8:12 a.m., Marco Martin wrote:
/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp (Diff revision 1) Fifteen::Fifteen(QGraphicsItem* parent, int size)35 m_size(0), // this will get overwritten in setSize(), but needs an initial value36 m_size(0), // this will get overwritten in setSize(), but needs an initial valueshouldn't be 0
The reason I set it to 0 here is that I have to call setSize(size) later, and that doesn't do anything if size == m_size. It should be safe though, because nothing uses m_size between here and the call to setSize(size). I've updated the comment to make this more clear.
On October 26th, 2010, 8:12 a.m., Marco Martin wrote:
/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp (Diff revision 1) void Fifteen::setSize(int size)59 m_size = size;60 m_size = size;m_size = qMax(size, 1) you added several foo % m_size, ensuring isn't 0 is important :)
Good point, thanks. I've just fixed in my local copy. I'll commit in a few minutes.
- Anthony
On October 13th, 2010, 1:40 p.m., Anthony Bryant wrote:
Review request for Plasma.
By Anthony Bryant.
Updated 2010-10-13 13:40:36 Description
Testing
Bugs:
156648
Diffs
Screenshots |