- 19 Aug, 2016 1 commit
-
-
Script Kiddy authored
-
- 12 Jun, 2016 1 commit
-
-
Script Kiddy authored
-
- 11 May, 2016 1 commit
-
-
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.
-
- 10 May, 2016 1 commit
-
-
Burkhard Lück authored
remove entities kappname, package - not used anymore bump date + releaseinfo add screenshot add missing shortcut remove absolete comment remove appendix
-
- 30 Apr, 2016 2 commits
-
-
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.
-
Frederik Schwarzer authored
-
- 26 Apr, 2016 3 commits
-
-
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.
-
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.
-
Julian Helfferich authored
dynamic_cast can return a NULL pointer. I added a check that the pointer is not NULL before it is dereferenced.
-
- 25 Apr, 2016 1 commit
-
-
Julian Helfferich authored
Member variables mpGame and mSendLength were uninitialized in the constructor of KBlocksNetPlayer. mpGame is now set to nullptr and mSendLength to 0.
-
- 24 Apr, 2016 1 commit
-
-
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.
-
- 22 Apr, 2016 2 commits
-
-
Julian Helfferich authored
The member variable mGamesPerWidth was not initialized in KBlocksDisplay. I found out that this variable is not used and I have thus commented it out.
-
Julian Helfferich authored
Fix error in constructor of Span. Instead of delegating to the other constructor, a temporary object was created. Now, it uses C++11 delegating constructor.
-
- 21 Apr, 2016 4 commits
-
-
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.
-
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.
-
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.
-
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.
-
- 20 Apr, 2016 3 commits
-
-
Julian Helfferich authored
Members of PieceInterface were not initialized. Furthermore, I noticed that the derived class KBlocksPiece redeclares and hides the PieceInterface members. I have removed the duplicate members from KBlocksPiece and moved the initialization of the members to the PieceInterface constructor.
-
Julian Helfferich authored
Two member variables in KBlocksNetServer are never used. I have commented them out.
-
Julian Helfferich authored
Several members in KBlocksNetServer were not initialized. I set all pointers to nullptr, and members to the default values they get assigned in executeGame(). I also commented out two members that are currently not used.
-
- 19 Apr, 2016 1 commit
-
-
Julian Helfferich authored
The uninitialized member in question is the pointer mMessageBox. The message box will be created in createGameItemGroups() and deleted in deleteGameItemGroups(). I set the pointer to nullptr in the constructor.
-
- 17 Apr, 2016 1 commit
-
-
Julian Helfferich authored
Coverity complained that the member variable wasn't initialized. I found out, that it is, in fact, never used. Thus, I commented it out. I didn't remove it as it indicates functionality that isn't implemented but makes sense from a design view.
-
- 14 Apr, 2016 1 commit
-
-
Julian Helfferich authored
Use initializer list to set member variables to their default values. The SingleGameInterface constructor should, however, only be called from the KBlocksSingleGame constructor which subsequently sets the variables to other values determined from the parameters to KBlocksSingleGame(). Nonetheless, it is good practice to make sure that all variables will be initialized.
-
- 10 Apr, 2016 1 commit
-
-
Julian Helfferich authored
QStandardPaths::DataLocation is deprecated. It is recommended to use QStandardPaths::AppDataLocation instead.
-
- 07 Apr, 2016 1 commit
-
-
Frederik Schwarzer authored
-
- 03 Apr, 2016 1 commit
-
-
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.
-
- 02 Apr, 2016 1 commit
-
-
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.
-
- 31 Mar, 2016 1 commit
-
-
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 "KBlocks.Graphics".
-
- 30 Mar, 2016 2 commits
-
-
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 authored
QLoggingCategories KBlocksGeneral and KBlocksAI are introduced in KBlocksDefine.{h,cpp} and AI/KBlocksTypeDefine.{h,cpp}.
-
- 29 Mar, 2016 3 commits
-
-
Julian Helfferich authored
The provides tag was missing and the Jenkins build reported it as a warning.
-
Julian Helfferich authored
The member variable mInitialInterval and mLevelUpInterval are not initialized in the constructor. Now, they are initialized taking the value 0, the default values for AI mode.
-
Julian Helfferich authored
The Qt versions are guaranteed to be portible. This fixes 11 Krazy issues.
-
- 28 Mar, 2016 4 commits
-
-
Frederik Schwarzer authored
-
Julian Helfferich authored
On the first line of gotoXY, the value of y was incremented. I removed this increment and instead increased y by one in each call of gotoXY, often by replacing y++ with ++y.
-
Julian Helfferich authored
Includes patch to stop playing sounds when game is paused.
-
Julian Helfferich authored
KBlocksWin now tells the AIPlayer and the KeyboardPlayer when the game is paused and resumed. The pauseGame() functions are already available for the two classes, but they have not been used yet. REVIEW: 127489
-
- 27 Mar, 2016 2 commits
-
-
Julian Helfferich authored
Constructors with one argument should be declared explicit. Here, the constructor behaves similar to a copy constructor, but it is none. The implicit conversion was used one. I made it explicit.
-
Julian Helfferich authored
In 15 files, the copyright line did not contain an email address. This was flagged by krazy2. I have contacted the author and got his permission to add his email address to the copyright.
-
- 22 Mar, 2016 1 commit
-
-
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 sounds. BUG: 319372 FIXED-IN: KDE Applications 16.04 REVIEW: 127370
-