1. 03 Apr, 2016 1 commit
    • Julian Helfferich's avatar
      Fix Coverity #76266: Initialize members, make constructor protected · 06321d62
      Julian Helfferich authored
      FieldInterface is a purely abstract class used as a base class for
      KBlocksField. Thus its constructor should be protected meaning that it
      can be called during the construction of KBlocksField, but calling
      FieldInterface fi = new FieldInterface() would fail.
      Also, the member variables are now initialized to their default values
      maBoard = nullptr, mWidth = 0, and mHeight = 0.
  2. 02 Apr, 2016 1 commit
    • Julian Helfferich's avatar
      Fix Coverty #76265: Make check for array bounds explicit · 2b096066
      Julian Helfferich authored
      Before, the function KBlocksField::getCell() checked that the variable
      cx was in bounds, i.e. larger than zero and smaller than the width of
      the play field. The check that cx is in bounds is important as it is
      used to index an array.
      Now, the check is done explicitely in KBlocksAIPlanner::process. It is
      good practice not to rely too much on a subfunction.
  3. 31 Mar, 2016 1 commit
    • Julian Helfferich's avatar
      Replace QDebug wich QLoggingCategory · 8e1227d4
      Julian Helfferich authored
      qDebug() and qWarning() have been used in KBlocksSound and
      KBlocksGraphics. I have replaced all occurences with qCDebug() and
      qCWarning(), using two new logging categories "KBlocks.Sound" and
  4. 30 Mar, 2016 2 commits
    • Julian Helfferich's avatar
      Fix Coverty #76262: Check for NULL pointer · 3994f7c3
      Julian Helfferich authored
      KBlocksAIPlayer::planning() did not check if pointer mpPlanner is NULL.
      This check has been added and if mpPlanner is NULL a warning is issued
      and the function left.
      I have tested this case by commenting out the creation of the Planner.
      As expected, the AI issues warnings that no planner has been set and
      behaves extremely stupid (all Blocks just drop without moving or
      rotating). No crash is encountered.
    • Julian Helfferich's avatar
      Introduce QLoggingCategories · eb9ad859
      Julian Helfferich authored
      QLoggingCategories KBlocksGeneral and KBlocksAI are introduced in
      KBlocksDefine.{h,cpp} and AI/KBlocksTypeDefine.{h,cpp}.
  5. 29 Mar, 2016 3 commits
  6. 28 Mar, 2016 4 commits
  7. 27 Mar, 2016 2 commits
  8. 22 Mar, 2016 1 commit
    • Julian Helfferich's avatar
      Activate sounds in KBlocks · d8d4f559
      Julian Helfferich authored
      Activate sounds making use of the new KgSound system. Sounds are played
      only for the human (keyboard) player. Keyboard input is connected to
      the game scene which owns an instance of KBlocksSound playing the
      BUG: 319372
      FIXED-IN: KDE Applications 16.04
      REVIEW: 127370
  9. 21 Mar, 2016 1 commit
  10. 14 Mar, 2016 1 commit
    • Julian Helfferich's avatar
      Port Sound to KgSound · e2dcae30
      Julian Helfferich authored
      Port sound in KBlocksSound from Phonon to KgSound. Note that no sound
      will be played (no sound played before). Re-activation of sounds will
      be adressed in the future.
      REVIEW: 127284
  11. 29 Feb, 2016 1 commit
  12. 28 Feb, 2016 2 commits
    • Julian Helfferich's avatar
      Merge branch 'Applications/15.12' · 59343afa
      Julian Helfferich authored
      Merge includes:
        * Appdata for Estonian
        * Fix unplayable game when changing difficulty
    • Julian Helfferich's avatar
      Fix unplayable game when changing difficulty · 145820a7
      Julian Helfferich authored
      Previously, changing the difficulty before the first game was started
      by selecting "Single Game" or "Human vs. AI" started an unplayable
      Now, levelChanged() calls singleGame() or pveStepGame() instead of
      startGame(). These functions are also called when selecting "Single
      Game" or "Human vs. AI", respectively, and correctly connect keyboard
      events to the game.
      BUG: 339038
      REVIEW: 127171
  13. 23 Feb, 2016 1 commit
    • Julian Helfferich's avatar
      Disable pause button when game stops · a08ba94a
      Julian Helfferich authored
      Previously, the pause button remained enabled even when no game was
      running. Only when it was pressed, KBlocks checked if a game was running
      and disabled the button if not.
      Now, a signal is emitted when the game stops and the pause button is
      disabled right away.
      REVIEW: 126788
  14. 29 Jan, 2016 1 commit
  15. 27 Jan, 2016 1 commit
  16. 14 Jan, 2016 1 commit
  17. 13 Jan, 2016 2 commits
  18. 10 Jan, 2016 1 commit
  19. 23 Dec, 2015 1 commit
  20. 22 Dec, 2015 2 commits
  21. 17 Dec, 2015 1 commit
    • Julian Helfferich's avatar
      Deactivate pause button when no game is running · 6879ab00
      Julian Helfferich authored
      Before, the pause button was always activated even when no game was
      running. This lead to undesired behavior, e.g. making it necessary to
      press the pause button twice to pause the game.
      With this fix, the pause button is deactivated on startup. The button
      gets activated when a game is started and when the button is pressed, it
      checks whether there is a running game.
      BUG: 264088
      REVIEW: 126200
  22. 14 Dec, 2015 2 commits
  23. 11 Nov, 2015 1 commit
  24. 04 Nov, 2015 1 commit
  25. 28 Oct, 2015 1 commit
  26. 25 Oct, 2015 1 commit
    • Julian Helfferich's avatar
      Avoid occurence of invisible blocks. · 65a1b813
      Julian Helfferich authored
      When a line is removed, fill the top line with empty cells. Before, the
      top line was not updated. This lead to the occurence of invisible blocks,
      if pieces were stacked up to the top line before. This patch was suggested
      by GJ in the discussion to bug #333694.
      BUG: 333694
      BUG: 344506
      REVIEW: 125578
  27. 10 Oct, 2015 3 commits