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

Ian Wadham ianw2 at optusnet.com.au
Thu Feb 16 00:35:45 UTC 2012


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


Looks fine to me and I agree with splitting off the view part, but I would like to go further someday (probably within the 4.9 development cycle).  I would like to be able to supply my own KCombobox, rather than be forced to use the default of having it in the status bar.  For example, I recently had to add a status bar to KSudoku just so that I could use the standard KDE Games difficulty widget.  The said status bar looks a bit like feathers on a dog at the moment...

I would be happy to make that change after KgDifficulty has "settled in" (i.e. unbinding from the status bar), if you could point me in the right direction.

- Ian Wadham


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/20120216/e03e54bc/attachment.html>


More information about the kde-games-devel mailing list