[Kde-games-devel] Review Request: deprecate KGameDifficulty, add KgDifficulty
Albert Astals Cid
aacid at kde.org
Wed Feb 15 23:32:49 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6903/#review10686
-----------------------------------------------------------
trunk/KDE/kdegames/kdiamond/src/main.cpp
<http://svn.reviewboard.kde.org/r/6903/#comment13191>
We do not support setting the difficulty level through a command line option anymore?
trunk/KDE/kdegames/libkdegames/kgdifficulty.h
<http://svn.reviewboard.kde.org/r/6903/#comment13196>
I'm not a fan of two classes in the same header, could i convince you to split it?
trunk/KDE/kdegames/libkdegames/kgdifficulty.h
<http://svn.reviewboard.kde.org/r/6903/#comment13192>
QDISABLE_COPY?
QProperties?
trunk/KDE/kdegames/libkdegames/kgdifficulty.h
<http://svn.reviewboard.kde.org/r/6903/#comment13193>
I think it's a good practive if you get the notify signals to be the property name + changed, i.e. currentLevel -> currentLevelChanged
this way from QML you can do the typical
onCurrentLevelChanged: console.log("foo", currentLevel)
trunk/KDE/kdegames/libkdegames/kgdifficulty.h
<http://svn.reviewboard.kde.org/r/6903/#comment13194>
Mark as explicit?
trunk/KDE/kdegames/libkdegames/kgdifficulty.h
<http://svn.reviewboard.kde.org/r/6903/#comment13195>
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
- Albert Astals Cid
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/25003a47/attachment-0001.html>
More information about the kde-games-devel
mailing list