From kde-panel-devel Tue Oct 26 22:14:42 2010 From: "Anthony Bryant" Date: Tue, 26 Oct 2010 22:14:42 +0000 To: kde-panel-devel Subject: Re: Review Request: More improvements to the Fifteen puzzle Message-Id: <20101026221442.13420.92161 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=128813132921791 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1404635945==" --===============1404635945== Content-Type: multipart/alternative; boundary="===============1467727180870169566==" --===============1467727180870169566== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On 2010-10-26 08:12:13, Marco Martin wrote: > > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp, line= 36 > > > > > > shouldn't be 0 The reason I set it to 0 here is that I have to call setSize(size) later, a= nd that doesn't do anything if size =3D=3D 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 2010-10-26 08:12:13, Marco Martin wrote: > > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp, line= 60 > > > > > > m_size =3D 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 ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/5617/#review8359 ----------------------------------------------------------- On 2010-10-13 13:40:36, Anthony Bryant wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/5617/ > ----------------------------------------------------------- > = > (Updated 2010-10-13 13:40:36) > = > = > Review request for Plasma. > = > = > Summary > ------- > = > Lots more improvements to the fifteen puzzle: > * Improved shuffle algorithm > * Resize fonts when the board size is changed > * Better checking for whether the board is solved > * Stop the pieces flickering when they are moved > * Changed the way board positions are stored > * Animate in the blank piece when the puzzle is solved > * Add a status bar underneath the puzzle, which shows a shuffle button an= d the time elapsed > = > = > This addresses bug 156648. > https://bugs.kde.org/show_bug.cgi?id=3D156648 > = > = > Diffs > ----- > = > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.h 1185297 = > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp 11852= 97 = > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteenPuzzle.h 1= 185297 = > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteenPuzzle.cpp= 1185297 = > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/piece.h 1185297 = > /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/piece.cpp 1185297 = > = > Diff: http://svn.reviewboard.kde.org/r/5617/diff > = > = > Testing > ------- > = > Solved the puzzle a few times, changed some settings, resized the applet. > = > = > Screenshots > ----------- > = > new puzzle layout > http://svn.reviewboard.kde.org/r/5617/s/535/ > = > = > Thanks, > = > Anthony > = > --===============1467727180870169566== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://svn.reviewb= oard.kde.org/r/5617/

On October 26th, 2010, 8:12 a.m., Marco Mar= tin wrote:

= = =
/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.c= pp (Diff revision 1)
Fifteen::Fifteen(QGraphicsItem* parent, int size)
35
      m_size(0), // this will get overwritten in setSize(), but needs an ini=
tial value
36
      m_size(0), // this will get overwritten in setSize(), but needs an ini=
tial value
shouldn&#=
39;t be 0
The reason I set it to 0 here is that I have to call setSize(size) l=
ater, and that doesn't do anything if size =3D=3D 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 Mar= tin wrote:

= = =
/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.c= pp (Diff revision 1)
void Fifteen::setSize(int size)
59
    m_size =3D size;<=
/pre>
60
    m_size =3D size;<=
/pre>
m_size =
=3D 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

Descripti= on

Lots more improvements to the fifteen puzzle:
* Improved shuffle algorithm
* Resize fonts when the board size is changed
* Better checking for whether the board is solved
* Stop the pieces flickering when they are moved
* Changed the way board positions are stored
* Animate in the blank piece when the puzzle is solved
* Add a status bar underneath the puzzle, which shows a shuffle button and =
the time elapsed

Testing <= /h1>
Solved the puzzle a few times, changed some settings, resize=
d the applet.
Bugs: 156648

Diffs=

  • /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.h (1185297)
  • /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp (1185297)
  • /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteenPuzzle.h = (1185297)
  • /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteenPuzzle.cp= p (1185297)
  • /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/piece.h (1185297)
  • /trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/piece.cpp (1185297)

View Diff

Screensho= ts

--===============1467727180870169566==-- --===============1404635945== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============1404635945==--