Home > Krazy Code Checker > kde-4.x > kdeutils > kfloppy
krazy2 Analysis
Checkers Run = 36
Files Processed = 9
Total Issues = 14
...as of March 11 2010 04:36:58 CET
- For File Type desktop
- Check that file ends with a newline [endswithnewline]...okay!
- Check for invalid icon names [iconnames]...okay!
- Check for spelling errors [spelling]...okay!
- Validates desktop files using 'desktop-file-validate' [validate]...okay!
- For File Type messages
- Check for appending to rc.cpp [rcappend]...okay!
- For File Type c++
- Check for TRUE and FALSE macros [captruefalse]...okay!
- Check for methods that return 'const' refs in public classes [constref]...okay!
- Check for an acceptable copyright [copyright]...okay!
- Check for cpp macros and usage [cpp]...OOPS! 2 issues found!
C++ source files and non-installed headers should NOT use cpp conditionals that check for a certain O/S or compiler; instead use CMake HAVE_foo macros. We want to check for features discovered during CMake time rather than for a specific O/S.
- Check for code that should be considered crashy. [crashy]...okay!
- Check single-char QString operations for efficiency [doublequote_chars]...okay!
- Check public classes with private members or d-pointer issues [dpointer]...okay!
- Check for QString compares to "" [emptystrcompare]...okay!
- Check that file ends with a newline [endswithnewline]...okay!
- Check for C++ ctors that should be declared 'explicit' [explicit]...okay!
- Check for foreach loop issues [foreach]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for invalid icon names [iconnames]...okay!
- Check for proper include directives [includes]...okay!
- Check for inline methods in public classes [inline]...okay!
- Check for an acceptable license [license]...okay!
- Check for assignments to QString::null [nullstrassign]...OOPS! 7 issues found!
Do not assign QString::null or QString() to a QString. Instead use the .clear() method. For example, "str = QString::null" becomes "str.clear()". When returning an empty string from a method use "return QString()" When passing an empty string use "QString()".
- Check for compares to QString::null or QString() [nullstrcompare]...okay!
- Check for C++ operators that should be 'const' [operators]...okay!
- Check for inappropriate pass-by-value function args [passbyvalue]...okay!
- Check for postfix usage of ++ and -- [postfixop]...okay!
- Check for dangerous or inefficient QByteArray usage [qbytearray]...okay!
- Check for Qt classes that should not be used [qclasses]...OOPS! 1 issues found!
- floppy.h: QLineEdit[KLineEdit],QComboBox[KComboBox],QComboBox[KComboBox],QComboBox[KComboBox]
Don't use Qt 4 classes that are deprecated. Additionally make sure to use the KDE version of some Qt GUI elements to provide a consistent look and feel for the KDE desktop. The KDE classes are not just adding functionalities to the Qt base class and are mostly not even based on the Qt class. http://techbase.kde.org/Policies/API_to_Avoid Please refer to the API documentation for details before porting to the K classes.
- Check for Qt methods that should be avoided [qmethods]...okay!
- Check for QMIN and QMAX macros [qminmax]...okay!
- Check for classes that should use the 'Q_OBJECT' macro [qobject]...okay!
- Check for signals: and slots: [sigsandslots]...okay!
- Check for spelling errors [spelling]...okay!
- Check for strings used improperly or should be i18n. [strings]...OOPS! 4 issues found!
- floppy.cpp: QLatin1String issues line# 436,438,510 (3)
- format.cpp: QLatin1String issues line# 502 (1)
Some QString methods (like startsWith() and endsWith()) are more efficient if they are passed a QLatin1String, avoiding an implicit conversion from const char *.
- Check for system calls to replace by KDE or Qt equivalents [syscalls]...okay!
- Check for typedefs that should be replaced by Qt typedefs [typedefs]...okay!