[Kde-games-devel] Review Request 110126: Changed two QTimer objects to QTimeLine objects, so that pause and resume functionality can be used to pause the Timers when the game is paused.

Viranch Mehta viranch.mehta at gmail.com
Wed Apr 24 21:27:35 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110126/#review31516
-----------------------------------------------------------



game.cpp
<http://git.reviewboard.kde.org/r/110126/#comment23478>

    this and its counterpart should go inside pause() and start() methods respectively. your fix wouldn't work if someone calls pause() and start() directly and not do switchPause()?



game.cpp
<http://git.reviewboard.kde.org/r/110126/#comment23479>

    the default behavior of QTimer::start() is to restart the timer if it is already, now that you've changed it to QTimeLine, this would throw a warning "already running" if it is running.
    
    so just to be safe, I'd recommend doing a if(running) stop; before starting it.



game.cpp
<http://git.reviewboard.kde.org/r/110126/#comment23480>

    same as I noted for preyTimer.


- Viranch Mehta


On April 22, 2013, 12:19 p.m., Dishant  Patel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110126/
> -----------------------------------------------------------
> 
> (Updated April 22, 2013, 12:19 p.m.)
> 
> 
> Review request for KDE Games and Viranch Mehta.
> 
> 
> Description
> -------
> 
> With respect to the bug, https://bugs.kde.org/show_bug.cgi?id=190372, i have implemented the m_bonusTimer and m_preyTimer timers to pause when the game state is Paused, and the timers resume when the game state resumes.
> 
> 
> This addresses bug https://bugs.kde.org/show_bug.cgi?id=190372.
>     http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=190372
> 
> 
> Diffs
> -----
> 
>   game.h be82b55 
>   game.cpp ddbc106 
> 
> Diff: http://git.reviewboard.kde.org/r/110126/diff/
> 
> 
> Testing
> -------
> 
> Yes,it works fine in my system.
> 
> 
> Thanks,
> 
> Dishant  Patel
> 
>

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


More information about the kde-games-devel mailing list