[Kde-games-devel] Review Request: deprecate KGameDifficulty, add KgDifficulty

Albert Astals Cid aacid at kde.org
Wed Feb 15 23:37:41 UTC 2012



> On Feb. 15, 2012, 11:32 p.m., Albert Astals Cid wrote:
> > trunk/KDE/kdegames/libkdegames/kgdifficulty.h, line 111
> > <http://svn.reviewboard.kde.org/r/6903/diff/1/?file=47671#file47671line111>
> >
> >     Can we get a addStandardLevel again? in case i just want to add Easy and Hard? I guess I could call addStandardLevelRange(Easy, Easy) but
> >     addStandardLevelRange(Easy) is much more natural

"but addStandardLevelRange(Easy) is much more natural" should read "but addStandardLevel(Easy) is much more natural"


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6903/#review10686
-----------------------------------------------------------


On Feb. 15, 2012, 9:33 p.m., Stefan Majewsky wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6903/
> -----------------------------------------------------------
> 
> (Updated Feb. 15, 2012, 9:33 p.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Description
> -------
> 
> Another day, another updated libkdegames component. KgDifficulty is a rewrite of KGameDifficulty which splits logic from GUI and provides a cleaner API for the logic part.
> 
> New features:
> * KgDifficulty automatically saves and restores the level selection across application runs.
> * The new KgDifficultyLevel base class allows applications to add more data and logic to their difficulty levels. (Usage of standard difficulty levels is simple as ever, and even simpler, thanks to the new addStandardLevelRange method.)
> * Everything in KgDifficulty is exposed through Q_PROPERTY for QML-readiness.
> 
> Removed features:
> * The standard level KGameDifficulty::Configurable has been removed since it's the same as ::Custom from the KgDifficulty point of view.
> * setRestartOnChange() has been removed. If you want that behavior, call setGameRunning() as appropriate. If you don't want that behavior, just don't.
> * The localization API (e.g. localizedLevelStrings) has been removed. The information can be retrieved by iterating over the levels(). This is the only point where application code is going to be more complex right now, but I plan to make KgDifficulty a first class citizen of KScoreDialog when I merge my old KScore2 branch (then as KgScore).
> 
> Compatibility: Highscore data which was created using KGameDifficulty metadata continues to work since the same data values, translations etc. are used internally. Since the difficulty level selection logic moves from the application to the library, compatibility cannot be retained, but that's a minor one-time issue caused by the update. I do not consider that problematic.
> 
> The fine print: The QtWidgets-dependent part has been separated into the KgDifficultyGUI namespace containing the single method KgDifficultyGUI::init. I intend to move this to a separate library once all QtWidgets dependencies are split from the core libkdegames.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdegames/kdiamond/src/board.h 1280243 
>   trunk/KDE/kdegames/kdiamond/src/board.cpp 1280243 
>   trunk/KDE/kdegames/kdiamond/src/game.h 1280243 
>   trunk/KDE/kdegames/kdiamond/src/game.cpp 1280243 
>   trunk/KDE/kdegames/kdiamond/src/main.cpp 1280243 
>   trunk/KDE/kdegames/kdiamond/src/mainwindow.h 1280243 
>   trunk/KDE/kdegames/kdiamond/src/mainwindow.cpp 1280243 
>   trunk/KDE/kdegames/libkdegames/CMakeLists.txt 1280243 
>   trunk/KDE/kdegames/libkdegames/includes/CMakeLists.txt 1280243 
>   trunk/KDE/kdegames/libkdegames/includes/KgDifficulty PRE-CREATION 
>   trunk/KDE/kdegames/libkdegames/kgamedifficulty.h 1280243 
>   trunk/KDE/kdegames/libkdegames/kgdifficulty.h PRE-CREATION 
>   trunk/KDE/kdegames/libkdegames/kgdifficulty.cpp PRE-CREATION 
> 
> Diff: http://svn.reviewboard.kde.org/r/6903/diff/
> 
> 
> Testing
> -------
> 
> My usual guinea pig (KDiamond) behaves fine. The tab selection in KScoreDialog (through setConfigGroup()) is broken for some reason, but I confirmed that it was already broken before the port. Might have to do with the deprecation warning for KScoreDialog::setConfigGroup().
> 
> 
> Thanks,
> 
> Stefan Majewsky
> 
>

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


More information about the kde-games-devel mailing list