[Kde-games-devel] Review Request 126200: Deactivate pause button when no game is running. Fixes bug #264088

Julian Helfferich julian.helfferich at googlemail.com
Sun Jan 10 04:05:17 UTC 2016



> On Dec. 17, 2015, 12:25 p.m., Roney Gomes wrote:
> > KBlocksWin.cpp, line 125
> > <https://git.reviewboard.kde.org/r/126200/diff/1/?file=421129#file421129line125>
> >
> >     That's personal opinion, of course. But I believe the code bellow is quite straightfoward thus making this comment unnecessary.

I agree that comments are a question of personal style and I know that I tend to over-comment. I have removed the unnecessary comments as you have suggested.


- Julian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126200/#review89647
-----------------------------------------------------------


On Dec. 17, 2015, 2:29 a.m., Julian Helfferich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126200/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2015, 2:29 a.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Bugs: 264088
>     http://bugs.kde.org/show_bug.cgi?id=264088
> 
> 
> Repository: kblocks
> 
> 
> Description
> -------
> 
> Until now, the pause button can be pressed, even when no game is running. This can lead to unwanted effects. For example, sometimes the player has to press the pause button twice to pause the game. You can recreate this behavior following these steps:
> 
> * Open KBlocks
> * Press the pause button (Button is pressed, no game running)
> * Start a new game (Button is pressed, game is running)
> * Press pause button (Button is released, game continues to run)
> * Press pause button again (Button is pressed, game is paused)
> 
> This fix does the following:
> 
> * The pause button is disabled on startup.
> * The button is activated when the game is started and set to "not pressed" (unchecked).
> * If the pause button is pressed, but no game is running, then the button is disabled.
> 
> The last point means that the button is not disabled when a game is finished. This is because the information that the game finished is not communicated. In order to do this, it would be necessary to make KBlocksGameLogic and KBlocksSingleGame QObjects and create a Signal/Slot connection. Does anyone have an anlternative idea? Or knows a better way to do this?
> 
> 
> Diffs
> -----
> 
>   KBlocksWin.cpp ca8139e 
> 
> Diff: https://git.reviewboard.kde.org/r/126200/diff/
> 
> 
> Testing
> -------
> 
> * Confirmed that the pause button is disabled on startup.
> * Pressed (disabled) pause button before game is started.
> * Started, paused & resumed game.
> * Started new game while game was either paused, running or finished.
> * Paused & resumed new game.
> * Pressed pause after game finished.
> 
> 
> Thanks,
> 
> Julian Helfferich
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20160110/ec7707b7/attachment-0001.html>


More information about the kde-games-devel mailing list