[Kde-games-devel] Review Request 127284: KBlocks: Port sound to KgSound

Frederik Schwarzer schwarzer at kde.org
Sun Mar 6 09:37:00 UTC 2016


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



Do you have any reason to move the enum outside of the class?
I am using C++ for some years now but have only started serious reading about it a few months ago. Meaning, my knowledge is pretty limited and I would like to understand, if there is a reason for that.

Same goes for "virtual". I have not advanced to the "virtual" chapter of the book I am reading. So ... well, at least I cannot comment on that change. :D

Otherwise I would say: "Ship it!", but you may want to wait a few days for others to comment.


KBlocksSound.cpp (lines 44 - 48)
<https://git.reviewboard.kde.org/r/127284/#comment63567>

    I think it's considered good practice to always have a default: label in every switch-case.
    There you can have some debug output saying that a sound was requested that does not exist yet.
    
    I mean, if you add a sound to the enum and then forget to add in to the switch-case.


- Frederik Schwarzer


On March 6, 2016, 3:55 a.m., Julian Helfferich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127284/
> -----------------------------------------------------------
> 
> (Updated March 6, 2016, 3:55 a.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: kblocks
> 
> 
> Description
> -------
> 
> Port sound in KBlocksSound from Phonon to KgSound. Note that neither before nor after this port sounds are played (the KBlocksSound::playSound() function is not called). I have also re-enabled the sound and will post the patch here once the port to KgSound is approved and pushed.
> 
> The new KBlocksSound uses the sounds from the sounds/ directory. Previously it was intended (at least it seams so to me) that the sound is part of the theme. However, there are only two of three sounds in the themes/ directory (default theme). Thus, unless there are any themed sounds, I suggest to simply use the sounds from the sounds/ directory.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 38fdfd3 
>   KBlocksScene.cpp 07cd457 
>   KBlocksSound.h dc02775 
>   KBlocksSound.cpp 1346bc6 
>   sounds/CMakeLists.txt PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/127284/diff/
> 
> 
> Testing
> -------
> 
> The testing were done for this patch plus the next patch enabling the sounds.
>  
> * Played single game -> Sounds play correctly.
> * Played Human vs AI -> Sounds play only for human player (as intended).
> * Turned off/on sounds -> Sounds off/on correctly.
> 
> 
> Thanks,
> 
> Julian Helfferich
> 
>

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


More information about the kde-games-devel mailing list