Home > Krazy Code Checker > kde-4.x > kdeutils > kcalc
krazy2 Analysis
Checkers Run = 49
Files Processed = 31
Total Issues = 5
...as of March 16 2010 04:14:25 CET
- 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]...OOPS! 1 issues found!
- kcalc_core.cpp: missing tags
All source files must contain a copyright header which identifies the copyright holder(s) together with a e-mail address that can be used to reach the copyright holder. One copyright holder per line, with real email addresses please. For details regarding KDE's licensing policy please visit http://techbase.kde.org/Policies/Licensing_Policy. A typical copyright looks like: "Copyright 2002,2005-2006 Joe Hacker
" - Check for cpp macros and usage [cpp]...okay!
- Check for code that should be considered crashy. [crashy]...okay!
- Check single-char QString operations for efficiency [doublequote_chars]...OOPS! 2 issues found!
- kcalcdisplay.cpp: line# 202,370 (2)
Adding single characters to a QString is faster if the characters are QChars and not QStrings. For example: QString path = oldpath + "/" + base is better written as QString path = oldpath + '/' + base. Same holds for arguments to QString::startsWith(), QString::endsWith(), QString::remove(), QString::section(), and QString::split(). Use QString::remove() instead of QString::replace(foo,"")
- 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]...OOPS! 1 issues found!
Use <..> to include installed headers;
to include Qt headers from installed headers; cpp file should include their own headers first (but below config.h); other rules apply, see http://techbase.kde.org/Policies/Library_Code_Policy#Getting_.23includes_right. Use include guards in headers with appropriatedly encoded macro names. - Check for inline methods in public classes [inline]...okay!
- Check for an acceptable license [license]...okay!
- Check for assignments to QString::null [nullstrassign]...okay!
- 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]...okay!
- 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]...okay!
- 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!
- For File Type kconfigxt
- Check that file ends with a newline [endswithnewline]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for spelling errors [spelling]...okay!
- Validates KConfigXT files using 'xmllint' [validate]...okay!
- For File Type designer
- Check that file ends with a newline [endswithnewline]...okay!
- Check for files that need to be fixed by 'fixuifiles' [fixuifiles]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for Qt classes that should not be used [qclasses]...OOPS! 1 issues found!
- constants.ui: QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit],QLineEdit[KLineEdit]
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 spelling errors [spelling]...okay!
- For File Type kpartgui
- Check that file ends with a newline [endswithnewline]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for spelling errors [spelling]...okay!
- Validates kpartgui files using 'xmllint' [validate]...okay!
- For File Type messages
- Check for appending to rc.cpp [rcappend]...okay!
- 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!