Skip to content
Snippets Groups Projects
  1. Jan 19, 2019
  2. Nov 28, 2018
  3. Nov 07, 2018
  4. Oct 26, 2018
  5. Oct 10, 2018
  6. Mar 13, 2018
  7. Oct 22, 2017
  8. Oct 15, 2017
  9. Sep 28, 2017
  10. Aug 23, 2017
  11. Jul 27, 2017
    • Julian Helfferich's avatar
      Fix incorrect resize before game is started · 6ee61601
      Julian Helfferich authored and Albert Astals Cid's avatar Albert Astals Cid committed
      When the game window is resized before a game is started, the game scene is not correctly rescaled. When starting the game it might be too small (it seems never to be too large).
      
      This commit fixes the bug by triggering a fitInView() call of the gameView. The same function is triggered by a resize event.
      
      BUGS: 380464
      REVIEW: 130167
      2 tags
      6ee61601
  12. Jul 15, 2017
  13. Jun 13, 2017
  14. Jun 08, 2017
  15. Mar 17, 2017
  16. Mar 13, 2017
  17. Jan 30, 2017
  18. Dec 20, 2016
  19. Aug 19, 2016
  20. Jun 12, 2016
  21. May 11, 2016
    • Julian Helfferich's avatar
      Move QLoggingCategories to KBlocks_debug.h and KBlocks_debug.cpp · 76c2a223
      Julian Helfferich authored
      Before, the logging categories were declared in KBlocksDefine.h. They
      are moved into the new file KBlocks_debug.h to be consistent with other
      KDE Games. Similarly, the QLoggingCategory declaration from
      AI/KBlocksAITypeDefine.h is moved to KBlocks_debug.h. The file
      AI/KBlocksAITypeDefine.cpp is no longer needed.
      76c2a223
  22. May 10, 2016
  23. Apr 30, 2016
    • Julian Helfferich's avatar
      Fix Coverity #76255: Calling risky function · 12860515
      Julian Helfferich authored
      When loading a plain text replay file, fscanf() was used. The use of
      this function is discouraged as it can lead to buffer overflows if the
      string read is larger than the reserved buffer.
      
      Now, the C-style functions are replaced with their C++ equivalents.
      This means the data is read from an ifstream and stored to a string via
      an istringstream.
      12860515
    • Frederik Schwarzer's avatar
      Add .gitignore file. · 0a4622ce
      Frederik Schwarzer authored
      0a4622ce
  24. Apr 26, 2016
    • Julian Helfferich's avatar
      Check for NULL pointers · 4c443768
      Julian Helfferich authored
      If the replay file can not be loaded, several pointers are set to NULL.
      In this case, several member functions crash if called.
      
      At the moment, these functions are not called since main checks if the
      replay file has been loaded successfully. However, if the check is
      omitted and the replay file cannot be loaded, the program crashes.
      
      I have added checks for NULL pointers in the member functions of
      KBlocksRepWin. Now, the program does not crash even if the check is
      omitted.
      4c443768
    • Julian Helfferich's avatar
      Fix Coverity #76268: Uninitialized members · 1b65c40f
      Julian Helfferich authored
      If the passed replay file can not be loaded, several pointers are not
      set. They are currently not accessed since an error is shown in
      main.cpp when the file cannot be loaded, but it is good practice to set
      them anyhow.
      1b65c40f
    • Julian Helfferich's avatar
      Fix Coverity #76262: Unchecked dynamic_cast · 9a1d8558
      Julian Helfferich authored
      dynamic_cast can return a NULL pointer. I added a check that the
      pointer is not NULL before it is dereferenced.
      9a1d8558
  25. Apr 25, 2016
  26. Apr 24, 2016
    • Julian Helfferich's avatar
      Fix Coverity #76278: Uninitialized member · 2c10cda9
      Julian Helfferich authored
      Member mRunning was uninitialized in the constructor of
      KBlocksPlayNetwork. Even though this member, which indicates whether a
      game is executed, is always initialized before it is used, it is good
      practice to initialize it in the constructor.
      
      It is now set to False in the constructor, indicating that no game is
      executed.
      2c10cda9
  27. Apr 22, 2016
  28. Apr 21, 2016
    • Julian Helfferich's avatar
      Fix Coverity #76275: Uninitialized pointer · 12c29cde
      Julian Helfferich authored
      The pointer mpGame in GamePlayerInterface was not initialized in the
      constructor.
      
      I noticed that both childs of GamePlayerInterface -- KBlocksDummyAI and
      KBlocksAIPlayer -- redeclare and hide mpGame instead of using the
      parent class member.
      
      I have removed the duplicate members in the child classes and initialize
      the pointer with nullptr.
      12c29cde
    • Julian Helfferich's avatar
      Fix Coverity #76274: Uninitialized members · 05ebfcbb
      Julian Helfferich authored
      In KBlocksGameLogic constructor mInitialInterval and mLevelUpInterval
      are uninitialized. I have set them to their default values for AI mode.
      
      This patch actually fixes Coverity #76280 while the fix for
      Coverity #76280 in fact fixed Coverity #76274. The confusion was due to
      the fact that both members were missing in both constructors and
      Coverity tracks them as separate issues. Now, both are fixed.
      05ebfcbb
    • Julian Helfferich's avatar
      Fix Coverity #76273: Uninitialized members · 75ddf0f4
      Julian Helfferich authored
      Pointer maGameList is not initialized in the constructor of
      GameLogicInterface. This class is an abstract base class and the pointer
      is initialized in the constructor of the only child class.
      
      Nonetheless, I have now set the pointer to nullptr in the initializer
      list of GameLogicInterface.
      75ddf0f4
    • Julian Helfferich's avatar
      Fix Coverity #76272: Uninitialized members · 700908db
      Julian Helfferich authored
      In KBlocksGameReplayer constructor some member variables remain
      uninitialized in case the replay file cannot be opened. In this case,
      the game replayer is useless and the list of records always empty.
      
      However, I set the variables anyhow.
      700908db
  29. Apr 20, 2016
Loading