pulled changes from kimmov (filelocation-refactor)
This commit is contained in:
commit
3c376047ba
.gitignore
gui
aboutdialog.cppaboutdialog.happlicationdialog.cppapplicationdialog.hcommon.hcppcheck_de.tscppcheck_en.tscppcheck_fi.tscppcheck_nl.tscppcheck_pl.tscppcheck_ru.tscppcheck_se.tsfileviewdialog.cppfileviewdialog.hgui.prologview.cpplogview.hlogview.uimain.uimainwindow.cppmainwindow.hresultsview.cppresultsview.hsettingsdialog.cppsettingsdialog.hthreadhandler.cppthreadresult.cppthreadresult.h
lib
checkclass.cppcheckclass.hcheckmemoryleak.cppcheckother.cppcheckunusedfunctions.cpperrorlogger.hexecutionpath.cpppreprocessor.cpptokenize.cpp
test
|
@ -29,8 +29,8 @@ gui/*.qm
|
|||
# Doxygen output folder
|
||||
doxyoutput/
|
||||
# qmake generated
|
||||
src/Makefile
|
||||
|
||||
*.sdf
|
||||
ipch
|
||||
*.opensdf
|
||||
*.orig
|
||||
|
|
|
@ -15,11 +15,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QWidget>
|
||||
#include "aboutdialog.h"
|
||||
|
||||
AboutDialog::AboutDialog(const QString &version, QWidget *parent)
|
||||
|
|
|
@ -21,9 +21,10 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
|
||||
#include "ui_about.h"
|
||||
|
||||
class QWidget;
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -16,14 +16,11 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "applicationdialog.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include "applicationdialog.h"
|
||||
|
||||
|
||||
ApplicationDialog::ApplicationDialog(const QString &name,
|
||||
|
|
|
@ -21,8 +21,11 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include <QLineEdit>
|
||||
#include <QString>
|
||||
#include "ui_application.h"
|
||||
|
||||
class QWidget;
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ ShowTypes;
|
|||
#define SETTINGS_LANGUAGE "Application language"
|
||||
#define SETTINGS_TOOLBARS_MAIN_SHOW "Toolbars/ShowStandard"
|
||||
#define SETTINGS_TOOLBARS_VIEW_SHOW "Toolbars/ShowView"
|
||||
#define SETTINGS_LOG_VIEW_WIDTH "Log/View width"
|
||||
#define SETTINGS_LOG_VIEW_HEIGHT "Log/View height"
|
||||
|
||||
/// @}
|
||||
#endif
|
||||
|
|
|
@ -124,19 +124,37 @@ kate -l(line) (file)</oldsource>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -156,265 +174,275 @@ kate -l(line) (file)</oldsource>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -426,18 +454,18 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -137,19 +137,37 @@ kate -l(line) (file)</translation>
|
|||
<translation>Could not read the file: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
|
@ -169,265 +187,275 @@ kate -l(line) (file)</translation>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation>&Check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation>&Edit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation>&License...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation>A&uthors...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation>&About...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation>&Files...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation>Ctrl+F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation>&Directory...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>Ctrl+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation>&Recheck files</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation>Ctrl+R</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation>&Stop</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation>Esc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation>&Save results to file...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&Quit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation>&Clear results</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation>&Preferences</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation>Show style errors</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation>Show common errors</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation>&Check all</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation>&Uncheck all</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translation>Collapse &all</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation>&Expand all</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation>&Language</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation>&Help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Select files to check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Select directory to check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation>No suitable files found to check!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation>License</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation>Authors</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation>Save the report file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation>XML files (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation>Text files (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -441,18 +469,18 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -139,19 +139,37 @@ kate -l(line) (file)
|
|||
<translation>Tiedoston %1 lukeminen epäonnistui</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation>Vakio</translation>
|
||||
</message>
|
||||
|
@ -171,265 +189,275 @@ kate -l(line) (file)
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation>&Tarkista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation>&Muokkaa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation>&Lisenssi...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation>&Tekijät...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation>&Tietoa ohjelmasta Cppcheck...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation>&Tiedostot...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation>Ctrl+F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation>&Hakemisto...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>Ctrl+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation>Tarkista tiedostot &uudelleen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation>Ctrl+R</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation>&Pysäytä</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation>Esc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation>&Tallenna tulokset tiedostoon...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&Lopeta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation>&Tyhjennä tulokset</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation>&Asetukset</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation>Näytä tyylivirheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation>Näytä yleiset virheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation>&Valitse kaikki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation>&Poista kaikista valinta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translation>&Pienennä kaikki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation>&Laajenna kaikki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation>&Kieli</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation>&Ohje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Valitse tarkistettavat tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Valitse tarkistettava hakemisto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation>Tarkistettavaksi sopivia tiedostoja ei löytynyt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation>Lisenssi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation>Tekijät</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation>XML-tiedostot (*.xml);;Tekstitiedostot (*.txt);;CSV-tiedostot (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation>Tallenna raportti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation>XML-tiedostot (*xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation>Tekstitiedostot (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -445,18 +473,18 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -137,19 +137,37 @@ kate -l(line) (file)</translation>
|
|||
<translation>Kon het bestand niet lezen: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standaard</translation>
|
||||
</message>
|
||||
|
@ -169,265 +187,275 @@ kate -l(line) (file)</translation>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation>&Controleer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation>Be&werken</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation>&Licentie...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation>A&uteurs...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation>&Over...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation>&Bestanden...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation>Ctrl+F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation>&Mappen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>Ctrl+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation>&Opnieuw controleren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation>Ctrl+R</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation>&Stop</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation>Esc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation>&Resultaten opslaan...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&Afsluiten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation>&Resultaten wissen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation>&Voorkeuren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation type="unfinished">Toon stijl fouten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation>Toon gewone fouten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation>&Selecteer alles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation>Selecteer &niets</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translation>Alles Inkl&appen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation>Alles &Uitklappen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation>&Taal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation>&Help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Selecteer bestanden om te controleren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Selecteer een map om te controleren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation>Geen geschikte bestanden gevonden om te controleren!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation>Licentie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation>Auteurs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation>XML bestanden (*.xml);;Tekst bestanden (*.txt);;CSV bestanden (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation>Rapport opslaan </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation>XML bestanden (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation>Tekst bestanden (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -441,18 +469,18 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -124,14 +124,32 @@ kate -l(line) (file)</oldsource>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -151,275 +169,285 @@ kate -l(line) (file)</oldsource>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -428,13 +456,13 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -127,19 +127,37 @@ kate -l(line) (file)</oldsource>
|
|||
<translation>Невозможно прочитать файл: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -159,265 +177,275 @@ kate -l(line) (file)</oldsource>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation>Проверить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation>Правка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation>Лицензия...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation>Авторы...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation>О программе...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation>Файлы...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation>Ctrl+F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation>Каталог...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>Ctrl+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation>Ctrl+R</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation>Остановить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation>Esc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation>Сохранить отчёт в файл...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation>Выход</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation>Очистить отчёт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation>Параметры</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation>Показывать ошибки стиля</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation>Показывать общие ошибки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation>Отметить все</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation>Сбросить все</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translation>Свернуть все</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation>Развернуть все</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation>Язык</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation>Помощь</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Выберите файлы для проверки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Выберите каталог для проверки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation>Лицензия</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation>Авторы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation>Текстовые файлы (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -433,18 +461,18 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -137,19 +137,37 @@ kate -l(line) (file)</translation>
|
|||
<translation>Kunde inte läsa filen: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogView</name>
|
||||
<message>
|
||||
<location filename="logview.ui" line="17"/>
|
||||
<source>Checking Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="48"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="logview.ui" line="55"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="221"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<location filename="mainwindow.cpp" line="619"/>
|
||||
<location filename="mainwindow.cpp" line="637"/>
|
||||
<location filename="mainwindow.cpp" line="226"/>
|
||||
<location filename="mainwindow.cpp" line="512"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<location filename="mainwindow.cpp" line="642"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="144"/>
|
||||
<location filename="main.ui" line="145"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
|
@ -169,266 +187,276 @@ kate -l(line) (file)</translation>
|
|||
<translation>Verktygsfält</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="121"/>
|
||||
<location filename="main.ui" line="122"/>
|
||||
<source>&Check</source>
|
||||
<translation>&Check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="130"/>
|
||||
<location filename="main.ui" line="131"/>
|
||||
<source>&Edit</source>
|
||||
<translation>&Redigera</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="175"/>
|
||||
<location filename="main.ui" line="176"/>
|
||||
<source>&License...</source>
|
||||
<translation>&Licens...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="180"/>
|
||||
<location filename="main.ui" line="181"/>
|
||||
<source>A&uthors...</source>
|
||||
<translation>&Utvecklat av...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="189"/>
|
||||
<location filename="main.ui" line="190"/>
|
||||
<source>&About...</source>
|
||||
<translation>&Om...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="194"/>
|
||||
<location filename="main.ui" line="195"/>
|
||||
<source>&Files...</source>
|
||||
<translation>&Filer...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="197"/>
|
||||
<location filename="main.ui" line="198"/>
|
||||
<source>Ctrl+F</source>
|
||||
<translation>Ctrl+F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="206"/>
|
||||
<location filename="main.ui" line="207"/>
|
||||
<source>&Directory...</source>
|
||||
<translation>&Katalog...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="209"/>
|
||||
<location filename="main.ui" line="210"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>Ctrl+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="218"/>
|
||||
<location filename="main.ui" line="219"/>
|
||||
<source>&Recheck files</source>
|
||||
<translation>Starta &om check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="221"/>
|
||||
<location filename="main.ui" line="222"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation>Ctrl+R</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="230"/>
|
||||
<location filename="main.ui" line="231"/>
|
||||
<source>&Stop</source>
|
||||
<translation>&Stoppa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="233"/>
|
||||
<location filename="main.ui" line="234"/>
|
||||
<source>Esc</source>
|
||||
<translation>Esc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="242"/>
|
||||
<location filename="main.ui" line="243"/>
|
||||
<source>&Save results to file...</source>
|
||||
<translation>&Spara resultat till fil...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="245"/>
|
||||
<location filename="main.ui" line="246"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="250"/>
|
||||
<location filename="main.ui" line="251"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&Avsluta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="259"/>
|
||||
<location filename="main.ui" line="260"/>
|
||||
<source>&Clear results</source>
|
||||
<translation>&Töm resultat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="268"/>
|
||||
<location filename="main.ui" line="269"/>
|
||||
<source>&Preferences</source>
|
||||
<translation>&Inställningar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="280"/>
|
||||
<location filename="main.ui" line="281"/>
|
||||
<source>Show style errors</source>
|
||||
<translation>Visa stilvarningar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="292"/>
|
||||
<location filename="main.ui" line="293"/>
|
||||
<source>Show common errors</source>
|
||||
<translation>Visa vanliga fel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="297"/>
|
||||
<location filename="main.ui" line="298"/>
|
||||
<source>&Check all</source>
|
||||
<translation>&Kryssa alla</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="302"/>
|
||||
<location filename="main.ui" line="303"/>
|
||||
<source>&Uncheck all</source>
|
||||
<translation>Kryssa &ur alla</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="307"/>
|
||||
<location filename="main.ui" line="308"/>
|
||||
<source>Collapse &all</source>
|
||||
<translatorcomment>Ingen bra översättning!</translatorcomment>
|
||||
<translation>&Fäll ihop alla</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="312"/>
|
||||
<location filename="main.ui" line="313"/>
|
||||
<source>&Expand all</source>
|
||||
<translation>&Expandera alla</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="320"/>
|
||||
<location filename="main.ui" line="321"/>
|
||||
<source>&Standard</source>
|
||||
<translation>&Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="323"/>
|
||||
<location filename="main.ui" line="324"/>
|
||||
<source>Standard items</source>
|
||||
<translation>Standard poster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="339"/>
|
||||
<location filename="main.ui" line="340"/>
|
||||
<source>Toolbar</source>
|
||||
<translation>Verktygsfält</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="347"/>
|
||||
<location filename="main.ui" line="348"/>
|
||||
<source>&Categories</source>
|
||||
<translation>&Kategorier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="350"/>
|
||||
<location filename="main.ui" line="351"/>
|
||||
<source>Error categories</source>
|
||||
<translation>Fel kategorier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="355"/>
|
||||
<location filename="main.ui" line="356"/>
|
||||
<source>&Open XML...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="360"/>
|
||||
<location filename="main.ui" line="361"/>
|
||||
<source>Open P&roject File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="365"/>
|
||||
<location filename="main.ui" line="366"/>
|
||||
<source>&New Project File...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="328"/>
|
||||
<location filename="main.ui" line="371"/>
|
||||
<source>&Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="374"/>
|
||||
<source>Log View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="329"/>
|
||||
<source>&Contents</source>
|
||||
<translation>&Innehåll</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="162"/>
|
||||
<location filename="main.ui" line="163"/>
|
||||
<source>Categories</source>
|
||||
<translation>Kategorier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="331"/>
|
||||
<location filename="main.ui" line="332"/>
|
||||
<source>Open the help contents</source>
|
||||
<translation>Öppna hjälp</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="334"/>
|
||||
<location filename="main.ui" line="335"/>
|
||||
<source>F1</source>
|
||||
<translation>F1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="106"/>
|
||||
<location filename="main.ui" line="107"/>
|
||||
<source>&Language</source>
|
||||
<translation>&Språk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.ui" line="111"/>
|
||||
<location filename="main.ui" line="112"/>
|
||||
<source>&Help</source>
|
||||
<translation>&Hjälp</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="262"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Välj filer att kontrollera</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="271"/>
|
||||
<location filename="mainwindow.cpp" line="276"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Välj katalog som skall kontrolleras</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="227"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation>Inga lämpliga filer hittades!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="544"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<source>License</source>
|
||||
<translation>Licens</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="551"/>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<source>Authors</source>
|
||||
<translation>Utvecklare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="559"/>
|
||||
<location filename="mainwindow.cpp" line="564"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation>XML filer (*.xml);;Text filer (*.txt);;CSV filer (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="566"/>
|
||||
<source>Save the report file</source>
|
||||
<translation>Spara rapport</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="449"/>
|
||||
<location filename="mainwindow.cpp" line="569"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<location filename="mainwindow.cpp" line="574"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation>XML filer (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="451"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<source>Open the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="503"/>
|
||||
<location filename="mainwindow.cpp" line="508"/>
|
||||
<source>Checking is running.
|
||||
|
||||
Do you want to stop the checking and exit Cppcheck?.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="575"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation>Text filer (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="581"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<source>CSV files (*.csv)</source>
|
||||
<translation>CSV filer (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="621"/>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="638"/>
|
||||
<location filename="mainwindow.cpp" line="643"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -444,18 +472,18 @@ Do you want to stop the checking and exit Cppcheck?.</source>
|
|||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<location filename="mainwindow.cpp" line="710"/>
|
||||
<location filename="mainwindow.cpp" line="726"/>
|
||||
<source>Project files (*.cppcheck);;All files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="707"/>
|
||||
<location filename="mainwindow.cpp" line="712"/>
|
||||
<source>Select Project File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="723"/>
|
||||
<location filename="mainwindow.cpp" line="728"/>
|
||||
<source>Select Project Filename</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -16,14 +16,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QFile>
|
||||
#include <QByteArray>
|
||||
#include <QMessageBox>
|
||||
#include <QTextEdit>
|
||||
#include "fileviewdialog.h"
|
||||
|
||||
FileViewDialog::FileViewDialog(const QString &file,
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#include <QString>
|
||||
#include "ui_file.h"
|
||||
|
||||
class QWidget;
|
||||
class QTextEdit;
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
||||
|
|
10
gui/gui.pro
10
gui/gui.pro
|
@ -26,7 +26,8 @@ FORMS = main.ui \
|
|||
settings.ui \
|
||||
file.ui \
|
||||
projectfile.ui \
|
||||
about.ui
|
||||
about.ui \
|
||||
logview.ui
|
||||
|
||||
TRANSLATIONS = cppcheck_fi.ts \
|
||||
cppcheck_nl.ts \
|
||||
|
@ -60,7 +61,9 @@ HEADERS += mainwindow.h \
|
|||
txtreport.h \
|
||||
xmlreport.h \
|
||||
translationhandler.h \
|
||||
csvreport.h
|
||||
csvreport.h \
|
||||
logview.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp\
|
||||
checkthread.cpp \
|
||||
|
@ -81,7 +84,8 @@ SOURCES += main.cpp \
|
|||
txtreport.cpp \
|
||||
xmlreport.cpp \
|
||||
translationhandler.cpp \
|
||||
csvreport.cpp
|
||||
csvreport.cpp \
|
||||
logview.cpp
|
||||
|
||||
win32 {
|
||||
RC_FILE = cppcheck-gui.rc
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Cppcheck - A tool for static C/C++ code analysis
|
||||
* Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QSettings>
|
||||
#include "common.h"
|
||||
#include "logview.h"
|
||||
|
||||
LogView::LogView(QSettings *programSettings, QWidget *parent)
|
||||
: mSettings(programSettings)
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
mUI.setupUi(this);
|
||||
setWindowFlags(Qt::Tool);
|
||||
|
||||
connect(mUI.mCloseButton, SIGNAL(clicked()), this, SLOT(CloseButtonClicked()));
|
||||
connect(mUI.mClearButton, SIGNAL(clicked()), this, SLOT(ClearButtonClicked()));
|
||||
|
||||
resize(mSettings->value(SETTINGS_LOG_VIEW_WIDTH, 400).toInt(),
|
||||
mSettings->value(SETTINGS_LOG_VIEW_HEIGHT, 300).toInt());
|
||||
}
|
||||
|
||||
LogView::~LogView()
|
||||
{
|
||||
mSettings->setValue(SETTINGS_LOG_VIEW_WIDTH, size().width());
|
||||
mSettings->setValue(SETTINGS_LOG_VIEW_HEIGHT, size().height());
|
||||
}
|
||||
|
||||
void LogView::AppendLine(const QString &line)
|
||||
{
|
||||
mUI.mLogEdit->appendPlainText(line);
|
||||
}
|
||||
|
||||
void LogView::CloseButtonClicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void LogView::ClearButtonClicked()
|
||||
{
|
||||
mUI.mLogEdit->clear();
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Cppcheck - A tool for static C/C++ code analysis
|
||||
* Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LOGVIEW_H
|
||||
#define LOGVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_logview.h"
|
||||
|
||||
class QSettings;
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
||||
/**
|
||||
* @brief A tool window that shows checking log.
|
||||
*
|
||||
*/
|
||||
class LogView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LogView(QSettings *programSettings, QWidget *parent = 0);
|
||||
~LogView();
|
||||
|
||||
/**
|
||||
* @brief Append new log file to view.
|
||||
* @param line String to add.
|
||||
*
|
||||
*/
|
||||
void AppendLine(const QString &line);
|
||||
|
||||
protected slots:
|
||||
|
||||
/**
|
||||
* @brief Called when close button is clicked.
|
||||
*
|
||||
*/
|
||||
void CloseButtonClicked();
|
||||
|
||||
/**
|
||||
* @brief Called when clear button is clicked.
|
||||
*
|
||||
*/
|
||||
void ClearButtonClicked();
|
||||
|
||||
private:
|
||||
Ui::LogView mUI;
|
||||
|
||||
/**
|
||||
* @brief Settings
|
||||
*
|
||||
*/
|
||||
QSettings *mSettings;
|
||||
|
||||
};
|
||||
|
||||
/// @}
|
||||
|
||||
#endif // LOGVIEW_H
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LogView</class>
|
||||
<widget class="QWidget" name="LogView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Checking Log</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="mLogEdit">
|
||||
<property name="undoRedoEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mClearButton">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mCloseButton">
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -100,6 +100,7 @@
|
|||
<addaction name="mActionCollapseAll"/>
|
||||
<addaction name="mActionExpandAll"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="mActionViewLog"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="mMenuLanguage">
|
||||
<property name="title">
|
||||
|
@ -365,6 +366,14 @@
|
|||
<string>&New Project File...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="mActionViewLog">
|
||||
<property name="text">
|
||||
<string>&Log View</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Log View</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "projectfile.h"
|
||||
#include "project.h"
|
||||
#include "report.h"
|
||||
#include "logview.h"
|
||||
#include "../lib/filelister.h"
|
||||
|
||||
// HTMLHelp is only available in Windows
|
||||
|
@ -45,12 +46,15 @@ MainWindow::MainWindow() :
|
|||
mSettings(new QSettings("Cppcheck", "Cppcheck-GUI", this)),
|
||||
mApplications(new ApplicationList(this)),
|
||||
mTranslation(new TranslationHandler(this)),
|
||||
mLanguages(new QActionGroup(this))
|
||||
mLanguages(new QActionGroup(this)),
|
||||
mLogView(NULL),
|
||||
mExiting(false)
|
||||
{
|
||||
mUI.setupUi(this);
|
||||
mUI.mResults->Initialize(mSettings, mApplications);
|
||||
|
||||
mThread = new ThreadHandler(this);
|
||||
mLogView = new LogView(mSettings);
|
||||
|
||||
connect(mUI.mActionQuit, SIGNAL(triggered()), this, SLOT(close()));
|
||||
connect(mUI.mActionCheckFiles, SIGNAL(triggered()), this, SLOT(CheckFiles()));
|
||||
|
@ -65,6 +69,7 @@ MainWindow::MainWindow() :
|
|||
connect(mUI.mActionUncheckAll, SIGNAL(triggered()), this, SLOT(UncheckAll()));
|
||||
connect(mUI.mActionCollapseAll, SIGNAL(triggered()), mUI.mResults, SLOT(CollapseAllResults()));
|
||||
connect(mUI.mActionExpandAll, SIGNAL(triggered()), mUI.mResults, SLOT(ExpandAllResults()));
|
||||
connect(mUI.mActionViewLog, SIGNAL(triggered()), this, SLOT(ShowLogView()));
|
||||
|
||||
connect(mUI.mActionRecheck, SIGNAL(triggered()), this, SLOT(ReCheck()));
|
||||
|
||||
|
@ -114,6 +119,7 @@ MainWindow::MainWindow() :
|
|||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete mLogView;
|
||||
}
|
||||
|
||||
void MainWindow::CreateLanguageMenuItems()
|
||||
|
@ -395,6 +401,12 @@ QStringList MainWindow::RemoveUnacceptedFiles(const QStringList &list)
|
|||
|
||||
void MainWindow::CheckDone()
|
||||
{
|
||||
if (mExiting)
|
||||
{
|
||||
close();
|
||||
return;
|
||||
}
|
||||
|
||||
mUI.mResults->CheckingFinished();
|
||||
EnableCheckButtons(true);
|
||||
mUI.mActionSettings->setEnabled(true);
|
||||
|
@ -518,9 +530,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||
// exiting it doesn't matter.
|
||||
mThread->Stop();
|
||||
SaveSettings();
|
||||
event->accept();
|
||||
mExiting = true;
|
||||
}
|
||||
else
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
|
@ -732,3 +743,21 @@ void MainWindow::NewProjectFile()
|
|||
prj.Edit();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::ShowLogView()
|
||||
{
|
||||
if (mLogView == NULL)
|
||||
mLogView = new LogView(mSettings);
|
||||
|
||||
mLogView->show();
|
||||
if (!mLogView->isActiveWindow())
|
||||
mLogView->activateWindow();
|
||||
}
|
||||
|
||||
void MainWindow::Log(const QString &logline)
|
||||
{
|
||||
if (mLogView)
|
||||
{
|
||||
mLogView->AppendLine(logline);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "ui_main.h"
|
||||
class ThreadHandler;
|
||||
class LogView;
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
@ -143,6 +144,12 @@ public slots:
|
|||
*/
|
||||
void OpenProjectFile();
|
||||
|
||||
/**
|
||||
* @brief Slot for showing the log view.
|
||||
*
|
||||
*/
|
||||
void ShowLogView();
|
||||
|
||||
protected slots:
|
||||
|
||||
/**
|
||||
|
@ -190,6 +197,12 @@ protected slots:
|
|||
*/
|
||||
void OpenHelpContents();
|
||||
|
||||
/**
|
||||
* @brief Add new line to log.
|
||||
*
|
||||
*/
|
||||
void Log(const QString &logline);
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
@ -325,6 +338,20 @@ protected:
|
|||
*/
|
||||
QString mCurrentDirectory;
|
||||
|
||||
/**
|
||||
* @brief Log view..
|
||||
*/
|
||||
LogView *mLogView;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Are we exiting the cppcheck?
|
||||
* If this is true then the cppcheck is waiting for check threads to exit
|
||||
* so that the application can be closed.
|
||||
*/
|
||||
bool mExiting;
|
||||
|
||||
};
|
||||
/// @}
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
*/
|
||||
|
||||
#include <QDebug>
|
||||
#include <QVBoxLayout>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include "erroritem.h"
|
||||
#include "resultsview.h"
|
||||
#include "resultstree.h"
|
||||
#include "report.h"
|
||||
#include "txtreport.h"
|
||||
#include "xmlreport.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <QWidget>
|
||||
#include <QProgressBar>
|
||||
#include "../lib/errorlogger.h"
|
||||
#include "resultstree.h"
|
||||
#include "common.h"
|
||||
#include "report.h"
|
||||
#include "ui_resultsview.h"
|
||||
|
|
|
@ -17,13 +17,15 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "settingsdialog.h"
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QDebug>
|
||||
#include <QTabWidget>
|
||||
#include <QSettings>
|
||||
#include "settingsdialog.h"
|
||||
#include "applicationdialog.h"
|
||||
#include "applicationlist.h"
|
||||
#include "common.h"
|
||||
|
||||
SettingsDialog::SettingsDialog(QSettings *programSettings,
|
||||
|
|
|
@ -21,18 +21,13 @@
|
|||
#define SETTINGSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
#include <QSettings>
|
||||
#include <QCheckBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include "applicationlist.h"
|
||||
|
||||
#include <QListWidget>
|
||||
#include <QKeyEvent>
|
||||
#include "ui_settings.h"
|
||||
|
||||
class QSettings;
|
||||
class QWidget;
|
||||
class ApplicationList;
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -144,6 +144,8 @@ void ThreadHandler::Initialize(ResultsView *view)
|
|||
connect(&mResults, SIGNAL(Error(const ErrorItem &)),
|
||||
view, SLOT(Error(const ErrorItem &)));
|
||||
|
||||
connect(&mResults, SIGNAL(Log(const QString &)),
|
||||
parent(), SLOT(Log(const QString &)));
|
||||
}
|
||||
|
||||
void ThreadHandler::LoadSettings(QSettings &settings)
|
||||
|
|
|
@ -33,7 +33,7 @@ ThreadResult::~ThreadResult()
|
|||
|
||||
void ThreadResult::reportOut(const std::string &outmsg)
|
||||
{
|
||||
Q_UNUSED(outmsg);
|
||||
emit Log(QString::fromStdString(outmsg));
|
||||
}
|
||||
|
||||
void ThreadResult::FileChecked(const QString &file)
|
||||
|
|
|
@ -93,6 +93,13 @@ signals:
|
|||
*/
|
||||
void Error(const ErrorItem &item);
|
||||
|
||||
/**
|
||||
* @brief Signal of a new log message
|
||||
*
|
||||
* @param logline Log line
|
||||
*/
|
||||
void Log(const QString &logline);
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,11 +41,12 @@ CheckClass instance;
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
CheckClass::Var *CheckClass::getVarList(const Token *tok1, bool withClasses, bool isStruct)
|
||||
CheckClass::Var *CheckClass::getVarList(const Token *tok1)
|
||||
{
|
||||
// Get variable list..
|
||||
Var *varlist = NULL;
|
||||
unsigned int indentlevel = 0;
|
||||
bool isStruct = tok1->str() == "struct";
|
||||
bool priv = !isStruct;
|
||||
for (const Token *tok = tok1; tok; tok = tok->next())
|
||||
{
|
||||
|
@ -131,13 +132,12 @@ CheckClass::Var *CheckClass::getVarList(const Token *tok1, bool withClasses, boo
|
|||
}
|
||||
|
||||
// Is it a variable declaration?
|
||||
bool isClass = false;
|
||||
if (Token::Match(next, "%type% %var% ;|:"))
|
||||
{
|
||||
if (withClasses)
|
||||
varname = next->strAt(1);
|
||||
else if (next->isStandardType())
|
||||
varname = next->strAt(1);
|
||||
else if (Token::findmatch(_tokenizer->tokens(), ("enum " + next->str()).c_str()))
|
||||
if (!next->isStandardType())
|
||||
isClass = true;
|
||||
|
||||
varname = next->strAt(1);
|
||||
}
|
||||
|
||||
|
@ -158,10 +158,9 @@ CheckClass::Var *CheckClass::getVarList(const Token *tok1, bool withClasses, boo
|
|||
// Array?
|
||||
else if (Token::Match(next, "%type% %var% [") && next->next()->str() != "operator")
|
||||
{
|
||||
if (!withClasses && !next->isStandardType())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!next->isStandardType())
|
||||
isClass = true;
|
||||
|
||||
varname = next->strAt(1);
|
||||
}
|
||||
|
||||
|
@ -172,15 +171,17 @@ CheckClass::Var *CheckClass::getVarList(const Token *tok1, bool withClasses, boo
|
|||
varname = next->strAt(4);
|
||||
|
||||
// std::string..
|
||||
else if (withClasses && Token::Match(next, "%type% :: %type% %var% ;"))
|
||||
else if (Token::Match(next, "%type% :: %type% %var% ;"))
|
||||
{
|
||||
isClass = true;
|
||||
varname = next->strAt(3);
|
||||
}
|
||||
|
||||
// Container..
|
||||
else if (withClasses && (Token::Match(next, "%type% :: %type% <") ||
|
||||
Token::Match(next, "%type% <")))
|
||||
else if (Token::Match(next, "%type% :: %type% <") ||
|
||||
Token::Match(next, "%type% <"))
|
||||
{
|
||||
isClass = true;
|
||||
// find matching ">"
|
||||
int level = 0;
|
||||
for (; next; next = next->next())
|
||||
|
@ -203,7 +204,7 @@ CheckClass::Var *CheckClass::getVarList(const Token *tok1, bool withClasses, boo
|
|||
// If the varname was set in the if-blocks above, create a entry for this variable..
|
||||
if (!varname.empty() && varname != "operator")
|
||||
{
|
||||
Var *var = new Var(varname, false, priv, isMutable, isStatic, varlist);
|
||||
Var *var = new Var(varname, false, priv, isMutable, isStatic, isClass, varlist);
|
||||
varlist = var;
|
||||
}
|
||||
}
|
||||
|
@ -225,8 +226,10 @@ void CheckClass::initVar(Var *varlist, const std::string &varname)
|
|||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void CheckClass::initializeVarList(const Token *tok1, const Token *ftok, Var *varlist, const std::string &classname, std::list<std::string> &callstack, bool isStruct)
|
||||
void CheckClass::initializeVarList(const Token *tok1, const Token *ftok, Var *varlist, std::list<std::string> &callstack)
|
||||
{
|
||||
const std::string &classname = tok1->next()->str();
|
||||
bool isStruct = tok1->str() == "struct";
|
||||
bool Assign = false;
|
||||
unsigned int indentlevel = 0;
|
||||
|
||||
|
@ -360,14 +363,22 @@ void CheckClass::initializeVarList(const Token *tok1, const Token *ftok, Var *va
|
|||
if (ftok2)
|
||||
{
|
||||
callstack.push_back(ftok->str());
|
||||
initializeVarList(tok1, ftok2, varlist, classname, callstack, isStruct);
|
||||
initializeVarList(tok1, ftok2, varlist, callstack);
|
||||
callstack.pop_back();
|
||||
}
|
||||
else // there is a called member function, but it is not defined where we can find it, so we assume it initializes everything
|
||||
{
|
||||
// check if the function is part of this class..
|
||||
const Token *tok = Token::findmatch(_tokenizer->tokens(), ((isStruct ? std::string("struct ") : std::string("class ")) + classname + " {").c_str());
|
||||
for (tok = tok ? tok->tokAt(3) : 0; tok; tok = tok->next())
|
||||
const Token *tok = Token::findmatch(_tokenizer->tokens(), (tok1->str() + " " + classname + " {|:").c_str());
|
||||
bool derived = false;
|
||||
while (tok && tok->str() != "{")
|
||||
{
|
||||
if (tok->str() == ":")
|
||||
derived = true;
|
||||
tok = tok->next();
|
||||
}
|
||||
|
||||
for (tok = tok ? tok->next() : 0; tok; tok = tok->next())
|
||||
{
|
||||
if (tok->str() == "{")
|
||||
{
|
||||
|
@ -380,14 +391,16 @@ void CheckClass::initializeVarList(const Token *tok1, const Token *ftok, Var *va
|
|||
break;
|
||||
}
|
||||
else if (tok->str() == ftok->str() || tok->str() == "friend")
|
||||
{
|
||||
if (tok->next()->str() == "(" || tok->str() == "friend")
|
||||
{
|
||||
tok = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// bail out..
|
||||
if (!tok)
|
||||
if (!tok || derived)
|
||||
{
|
||||
for (Var *var = varlist; var; var = var->next)
|
||||
var->init = true;
|
||||
|
@ -474,7 +487,7 @@ struct Constructor
|
|||
bool isCopyConstructor;
|
||||
};
|
||||
|
||||
static bool argsMatch(const Token *first, const Token *second)
|
||||
static bool argsMatch(const Token *first, const Token *second, const std::string &path, unsigned int depth)
|
||||
{
|
||||
bool match = false;
|
||||
while (first->str() == second->str())
|
||||
|
@ -517,6 +530,35 @@ static bool argsMatch(const Token *first, const Token *second)
|
|||
first = first->tokAt(2);
|
||||
}
|
||||
|
||||
// variable with class path
|
||||
else if (depth && Token::Match(first->next(), "%var%"))
|
||||
{
|
||||
std::string param = path + first->next()->str();
|
||||
|
||||
if (Token::Match(second->next(), param.c_str()))
|
||||
{
|
||||
second = second->tokAt(depth * 2);
|
||||
}
|
||||
else if (depth > 1)
|
||||
{
|
||||
std::string short_path = path;
|
||||
|
||||
// remove last " :: "
|
||||
short_path.resize(short_path.size() - 4);
|
||||
|
||||
// remove last name
|
||||
while (!short_path.empty() && short_path[short_path.size() - 1] != ' ')
|
||||
short_path.resize(short_path.size() - 1);
|
||||
|
||||
param = short_path + first->next()->str();
|
||||
|
||||
if (Token::Match(second->next(), param.c_str()))
|
||||
{
|
||||
second = second->tokAt((depth - 1) * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
first = first->next();
|
||||
second = second->next();
|
||||
}
|
||||
|
@ -619,6 +661,8 @@ void CheckClass::constructors()
|
|||
int stack_index = spaceInfo.size() - 1;
|
||||
|
||||
std::string classPattern;
|
||||
std::string classPath;
|
||||
std::string searchPattern;
|
||||
int offset1, offset2;
|
||||
if (operatorEqual)
|
||||
{
|
||||
|
@ -632,25 +676,25 @@ void CheckClass::constructors()
|
|||
}
|
||||
|
||||
bool hasBody = false;
|
||||
unsigned int depth = 0;
|
||||
while (!hasBody && stack_index >= 0)
|
||||
{
|
||||
classPattern = spaceInfo[stack_index].className + std::string(" :: ") + classPattern;
|
||||
classPath = spaceInfo[stack_index].className + std::string(" :: ") + classPath;
|
||||
searchPattern = classPath + classPattern;
|
||||
offset2 += 2;
|
||||
depth++;
|
||||
|
||||
// start looking at end of class
|
||||
const Token *constructor_token = spaceInfo[stack_index].classEnd;
|
||||
|
||||
while ((constructor_token = Token::findmatch(constructor_token, classPattern.c_str())) != NULL)
|
||||
while ((constructor_token = Token::findmatch(constructor_token, searchPattern.c_str())) != NULL)
|
||||
{
|
||||
// skip destructor and other classes
|
||||
if (!Token::Match(constructor_token->previous(), "~|::"))
|
||||
{
|
||||
if (argsMatch(tok->tokAt(offset1), constructor_token->tokAt(offset2)))
|
||||
if (argsMatch(tok->tokAt(offset1), constructor_token->tokAt(offset2), classPath, depth))
|
||||
{
|
||||
if (operatorEqual || copyConstructor)
|
||||
constructorList.push_back(Constructor(constructor_token, access, true, operatorEqual, copyConstructor));
|
||||
else
|
||||
constructorList.push_front(Constructor(constructor_token, access, true, false, false));
|
||||
|
||||
hasBody = true;
|
||||
break;
|
||||
|
@ -669,10 +713,7 @@ void CheckClass::constructors()
|
|||
// function body found?
|
||||
if (!hasBody)
|
||||
{
|
||||
if (operatorEqual || copyConstructor)
|
||||
constructorList.push_back(Constructor(tok, access, false, operatorEqual, copyConstructor));
|
||||
else
|
||||
constructorList.push_front(Constructor(tok, access, false, false, false));
|
||||
}
|
||||
|
||||
tok = next->next();
|
||||
|
@ -684,10 +725,7 @@ void CheckClass::constructors()
|
|||
// skip destructor and other classes
|
||||
if (!Token::Match(tok->previous(), "~|::"))
|
||||
{
|
||||
if (operatorEqual || copyConstructor)
|
||||
constructorList.push_back(Constructor(tok, access, true, operatorEqual, copyConstructor));
|
||||
else
|
||||
constructorList.push_front(Constructor(tok, access, true, false, false));
|
||||
}
|
||||
|
||||
// skip over function body
|
||||
|
@ -700,8 +738,8 @@ void CheckClass::constructors()
|
|||
}
|
||||
}
|
||||
|
||||
// Get variables that are not classes...
|
||||
Var *varlist = getVarList(tok1, false, isStruct);
|
||||
// Get variables...
|
||||
Var *varlist = getVarList(tok1);
|
||||
|
||||
// There are no constructors.
|
||||
if (numConstructors == 0)
|
||||
|
@ -709,7 +747,7 @@ void CheckClass::constructors()
|
|||
// If there is a private variable, there should be a constructor..
|
||||
for (const Var *var = varlist; var; var = var->next)
|
||||
{
|
||||
if (var->priv && !var->isStatic)
|
||||
if (var->priv && !var->isClass && !var->isStatic)
|
||||
{
|
||||
noConstructorError(tok1, className, isStruct);
|
||||
break;
|
||||
|
@ -718,37 +756,22 @@ void CheckClass::constructors()
|
|||
}
|
||||
|
||||
std::list<Constructor>::const_iterator it;
|
||||
bool hasClasses = false;
|
||||
|
||||
for (it = constructorList.begin(); it != constructorList.end(); ++it)
|
||||
{
|
||||
// check for end of regular constructors and start of copy constructors
|
||||
bool needClasses = it->isCopyConstructor || it->isOperatorEqual;
|
||||
if (needClasses != hasClasses)
|
||||
{
|
||||
hasClasses = needClasses;
|
||||
|
||||
// Delete the varlist..
|
||||
while (varlist)
|
||||
{
|
||||
Var *nextvar = varlist->next;
|
||||
delete varlist;
|
||||
varlist = nextvar;
|
||||
}
|
||||
|
||||
// Get variables including classes
|
||||
varlist = getVarList(tok1, true, isStruct);
|
||||
}
|
||||
|
||||
if (!it->hasBody)
|
||||
continue;
|
||||
|
||||
std::list<std::string> callstack;
|
||||
initializeVarList(tok1, it->token, varlist, className, callstack, isStruct);
|
||||
initializeVarList(tok1, it->token, varlist, callstack);
|
||||
|
||||
// Check if any variables are uninitialized
|
||||
for (Var *var = varlist; var; var = var->next)
|
||||
{
|
||||
// skip classes for regular constructor
|
||||
if (var->isClass && !(it->isCopyConstructor || it->isOperatorEqual))
|
||||
continue;
|
||||
|
||||
if (var->init || var->isStatic)
|
||||
continue;
|
||||
|
||||
|
@ -1696,11 +1719,123 @@ void CheckClass::thisSubtraction()
|
|||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// check if this function is defined virtual in the base classes
|
||||
bool CheckClass::isVirtual(const std::vector<std::string> &derivedFrom, const Token *functionToken) const
|
||||
{
|
||||
// check each base class
|
||||
for (unsigned int i = 0; i < derivedFrom.size(); ++i)
|
||||
{
|
||||
std::string className;
|
||||
|
||||
if (derivedFrom[i].find("::") != std::string::npos)
|
||||
{
|
||||
/** @todo handle nested base classes and namespaces */
|
||||
}
|
||||
else
|
||||
className = derivedFrom[i];
|
||||
|
||||
std::string classPattern = std::string("class|struct ") + className + std::string(" {|:");
|
||||
|
||||
// find the base class
|
||||
const Token *classToken = Token::findmatch(_tokenizer->tokens(), classPattern.c_str());
|
||||
|
||||
// find the function in the base class
|
||||
if (classToken)
|
||||
{
|
||||
std::vector<std::string> baseList;
|
||||
const Token * tok = classToken;
|
||||
|
||||
while (tok->str() != "{")
|
||||
{
|
||||
// check for base classes
|
||||
if (Token::Match(tok, ":|, public|protected|private"))
|
||||
{
|
||||
// jump to base class name
|
||||
tok = tok->tokAt(2);
|
||||
|
||||
std::string base;
|
||||
|
||||
// handle nested base classea and namespacess
|
||||
while (Token::Match(tok, "%var% ::"))
|
||||
{
|
||||
base += tok->str();
|
||||
base += " :: ";
|
||||
tok = tok->tokAt(2);
|
||||
}
|
||||
|
||||
base += tok->str();
|
||||
|
||||
// save pattern for base class name
|
||||
baseList.push_back(base);
|
||||
}
|
||||
tok = tok->next();
|
||||
}
|
||||
|
||||
tok = tok->next();
|
||||
|
||||
for (; tok; tok = tok->next())
|
||||
{
|
||||
if (tok->str() == "{")
|
||||
tok = tok->link();
|
||||
else if (tok->str() == "}")
|
||||
break;
|
||||
else if (Token::Match(tok, "public:|protected:|private:"))
|
||||
continue;
|
||||
else if (tok->str() == "(")
|
||||
tok = tok->link();
|
||||
else if (tok->str() == "virtual")
|
||||
{
|
||||
// goto the function name
|
||||
while (tok->next()->str() != "(")
|
||||
tok = tok->next();
|
||||
|
||||
// do the function names match?
|
||||
if (tok->str() == functionToken->str())
|
||||
{
|
||||
const Token *temp1 = tok->previous();
|
||||
const Token *temp2 = functionToken->previous();
|
||||
bool returnMatch = true;
|
||||
|
||||
// check for matching return parameters
|
||||
while (temp1->str() != "virtual")
|
||||
{
|
||||
if (temp1->str() != temp2->str())
|
||||
{
|
||||
returnMatch = false;
|
||||
break;
|
||||
}
|
||||
|
||||
temp1 = temp1->previous();
|
||||
temp2 = temp2->previous();
|
||||
}
|
||||
|
||||
// check for matching function parameters
|
||||
if (returnMatch && argsMatch(tok->tokAt(2), functionToken->tokAt(2), std::string(""), 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!baseList.empty())
|
||||
{
|
||||
if (isVirtual(baseList, functionToken))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
struct NestInfo
|
||||
{
|
||||
std::string className;
|
||||
const Token * classEnd;
|
||||
const Token *classStart;
|
||||
const Token *classEnd;
|
||||
int levelEnd;
|
||||
std::vector<std::string> derivedFrom;
|
||||
};
|
||||
|
||||
// Can a function be const?
|
||||
|
@ -1722,23 +1857,47 @@ void CheckClass::checkConst()
|
|||
if (level == nestInfo.back().levelEnd)
|
||||
nestInfo.pop_back();
|
||||
}
|
||||
else if (Token::Match(tok, "class|struct %var% {"))
|
||||
else if (Token::Match(tok, "class|struct %var% {|:"))
|
||||
{
|
||||
const Token *classTok = tok;
|
||||
NestInfo info;
|
||||
|
||||
// get class name..
|
||||
std::string classname(tok->strAt(1));
|
||||
info.className = classname;
|
||||
info.classStart = tok;
|
||||
|
||||
// goto initial {'
|
||||
// goto initial '{'
|
||||
while (tok && tok->str() != "{")
|
||||
{
|
||||
// check for base classes
|
||||
if (Token::Match(tok, ":|, public|protected|private"))
|
||||
{
|
||||
// jump to base class name
|
||||
tok = tok->tokAt(2);
|
||||
|
||||
std::string derivedFrom;
|
||||
|
||||
// handle derived base classes
|
||||
while (Token::Match(tok, "%var% ::"))
|
||||
{
|
||||
derivedFrom += tok->str();
|
||||
derivedFrom += " :: ";
|
||||
tok = tok->tokAt(2);
|
||||
}
|
||||
|
||||
derivedFrom += tok->str();
|
||||
|
||||
// save pattern for base class name
|
||||
info.derivedFrom.push_back(derivedFrom);
|
||||
}
|
||||
tok = tok->next();
|
||||
}
|
||||
if (!tok)
|
||||
break;
|
||||
|
||||
const Token *classEnd = tok->link();
|
||||
|
||||
NestInfo info;
|
||||
info.className = classname;
|
||||
info.classEnd = classEnd;
|
||||
info.levelEnd = level++;
|
||||
nestInfo.push_back(info);
|
||||
|
@ -1752,7 +1911,7 @@ void CheckClass::checkConst()
|
|||
}
|
||||
|
||||
// Get class variables...
|
||||
varlist = getVarList(classTok, true, classTok->str() == "struct");
|
||||
varlist = getVarList(classTok);
|
||||
|
||||
// parse in this class definition to see if there are any simple getter functions
|
||||
for (const Token *tok2 = tok->next(); tok2; tok2 = tok2->next())
|
||||
|
@ -1813,6 +1972,8 @@ void CheckClass::checkConst()
|
|||
if (functionName == classname)
|
||||
continue;
|
||||
|
||||
const Token *functionToken = tok2;
|
||||
|
||||
// goto the ')'
|
||||
tok2 = tok2->next()->link();
|
||||
if (!tok2)
|
||||
|
@ -1823,8 +1984,15 @@ void CheckClass::checkConst()
|
|||
{
|
||||
const Token *paramEnd = tok2;
|
||||
|
||||
// check if base class function is virtual
|
||||
if (!info.derivedFrom.empty())
|
||||
{
|
||||
if (isVirtual(info.derivedFrom, functionToken))
|
||||
continue;
|
||||
}
|
||||
|
||||
// if nothing non-const was found. write error..
|
||||
if (checkConstFunc(classname, varlist, paramEnd))
|
||||
if (checkConstFunc(info.className, info.derivedFrom, varlist, paramEnd))
|
||||
{
|
||||
for (int i = nestInfo.size() - 2; i >= 0; i--)
|
||||
classname = std::string(nestInfo[i].className + "::" + classname);
|
||||
|
@ -1834,6 +2002,13 @@ void CheckClass::checkConst()
|
|||
}
|
||||
else if (Token::simpleMatch(tok2, ") ;")) // not inline
|
||||
{
|
||||
// check if base class function is virtual
|
||||
if (!info.derivedFrom.empty())
|
||||
{
|
||||
if (isVirtual(info.derivedFrom, functionToken))
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int i = nestInfo.size() - 1; i >= 0; i--)
|
||||
{
|
||||
const Token *found = nestInfo[i].classEnd;
|
||||
|
@ -1852,7 +2027,7 @@ void CheckClass::checkConst()
|
|||
if (sameFunc(namespaceLevel, tok2, paramEnd))
|
||||
{
|
||||
// if nothing non-const was found. write error..
|
||||
if (checkConstFunc(classname, varlist, paramEnd))
|
||||
if (checkConstFunc(info.className, info.derivedFrom, varlist, paramEnd))
|
||||
{
|
||||
for (int k = nestInfo.size() - 2; k >= 0; k--)
|
||||
classname = std::string(nestInfo[k].className + "::" + classname);
|
||||
|
@ -2079,7 +2254,7 @@ bool CheckClass::isMemberFunc(const Token *tok)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CheckClass::isMemberVar(const std::string &classname, const Var *varlist, const Token *tok)
|
||||
bool CheckClass::isMemberVar(const std::string &classname, const std::vector<std::string> &derivedFrom, const Var *varlist, const Token *tok)
|
||||
{
|
||||
while (tok->previous() && !Token::Match(tok->previous(), "}|{|;|public:|protected:|private:|return|:|?"))
|
||||
{
|
||||
|
@ -2107,10 +2282,71 @@ bool CheckClass::isMemberVar(const std::string &classname, const Var *varlist, c
|
|||
}
|
||||
}
|
||||
|
||||
// not found in this class
|
||||
if (!derivedFrom.empty())
|
||||
{
|
||||
// check each base class
|
||||
for (unsigned int i = 0; i < derivedFrom.size(); ++i)
|
||||
{
|
||||
std::string className;
|
||||
|
||||
if (derivedFrom[i].find("::") != std::string::npos)
|
||||
{
|
||||
/** @todo handle nested base classes and namespaces */
|
||||
}
|
||||
else
|
||||
className = derivedFrom[i];
|
||||
|
||||
std::string classPattern = std::string("class|struct ") + className + std::string(" {|:");
|
||||
|
||||
// find the base class
|
||||
const Token *classToken = Token::findmatch(_tokenizer->tokens(), classPattern.c_str());
|
||||
|
||||
// find the function in the base class
|
||||
if (classToken)
|
||||
{
|
||||
std::vector<std::string> baseList;
|
||||
const Token * tok1 = classToken;
|
||||
|
||||
while (tok1->str() != "{")
|
||||
{
|
||||
// check for base classes
|
||||
if (Token::Match(tok1, ":|, public|protected|private"))
|
||||
{
|
||||
// jump to base class name
|
||||
tok1 = tok1->tokAt(2);
|
||||
|
||||
std::string base;
|
||||
|
||||
// handle nested base classea and namespacess
|
||||
while (Token::Match(tok1, "%var% ::"))
|
||||
{
|
||||
base += tok1->str();
|
||||
base += " :: ";
|
||||
tok1 = tok1->tokAt(2);
|
||||
}
|
||||
|
||||
base += tok1->str();
|
||||
|
||||
// save pattern for base class name
|
||||
baseList.push_back(base);
|
||||
}
|
||||
tok1 = tok1->next();
|
||||
}
|
||||
|
||||
// Get class variables...
|
||||
Var *varlist1 = getVarList(classToken);
|
||||
|
||||
if (isMemberVar(classToken->next()->str(), baseList, varlist1, tok))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CheckClass::checkConstFunc(const std::string &classname, const Var *varlist, const Token *tok)
|
||||
bool CheckClass::checkConstFunc(const std::string &classname, const std::vector<std::string> &derivedFrom, const Var *varlist, const Token *tok)
|
||||
{
|
||||
// if the function doesn't have any assignment nor function call,
|
||||
// it can be a const function..
|
||||
|
@ -2132,7 +2368,7 @@ bool CheckClass::checkConstFunc(const std::string &classname, const Var *varlist
|
|||
(tok1->str().find("=") == 1 &&
|
||||
tok1->str().find_first_of("<!>") == std::string::npos))
|
||||
{
|
||||
if (isMemberVar(classname, varlist, tok1->previous()))
|
||||
if (isMemberVar(classname, derivedFrom, varlist, tok1->previous()))
|
||||
{
|
||||
isconst = false;
|
||||
break;
|
||||
|
@ -2140,7 +2376,7 @@ bool CheckClass::checkConstFunc(const std::string &classname, const Var *varlist
|
|||
}
|
||||
|
||||
// streaming: <<
|
||||
else if (tok1->str() == "<<" && isMemberVar(classname, varlist, tok1->previous()))
|
||||
else if (tok1->str() == "<<" && isMemberVar(classname, derivedFrom, varlist, tok1->previous()))
|
||||
{
|
||||
isconst = false;
|
||||
break;
|
||||
|
@ -2154,7 +2390,7 @@ bool CheckClass::checkConstFunc(const std::string &classname, const Var *varlist
|
|||
}
|
||||
|
||||
// function call..
|
||||
else if ((tok1->str() != "return" && Token::Match(tok1, "%var% (") && tok1->str() != "c_str") ||
|
||||
else if ((Token::Match(tok1, "%var% (") && !Token::Match(tok1, "return|c_str|if")) ||
|
||||
Token::Match(tok1, "%var% < %any% > ("))
|
||||
{
|
||||
isconst = false;
|
||||
|
|
|
@ -109,12 +109,13 @@ private:
|
|||
class Var
|
||||
{
|
||||
public:
|
||||
Var(const std::string &name_, bool init_ = false, bool priv_ = false, bool mutable_ = false, bool static_ = false, Var *next_ = 0)
|
||||
Var(const std::string &name_, bool init_ = false, bool priv_ = false, bool mutable_ = false, bool static_ = false, bool class_ = false, Var *next_ = 0)
|
||||
: name(name_),
|
||||
init(init_),
|
||||
priv(priv_),
|
||||
isMutable(mutable_),
|
||||
isStatic(static_),
|
||||
isClass(class_),
|
||||
next(next_)
|
||||
{
|
||||
}
|
||||
|
@ -134,6 +135,9 @@ private:
|
|||
/** @brief is this variable static? */
|
||||
bool isStatic;
|
||||
|
||||
/** @brief is this variable a class (or unknown type)? */
|
||||
bool isClass;
|
||||
|
||||
/** @brief next Var item */
|
||||
Var *next;
|
||||
|
||||
|
@ -146,11 +150,9 @@ private:
|
|||
* @param tok1 pointer to class declaration
|
||||
* @param ftok pointer to the function that should be checked
|
||||
* @param varlist variable list (the "init" flag will be set in these variables)
|
||||
* @param classname name of class
|
||||
* @param callstack the function doesn't look into recursive function calls.
|
||||
* @param isStruct if this is a struct instead of a class
|
||||
*/
|
||||
void initializeVarList(const Token *tok1, const Token *ftok, Var *varlist, const std::string &classname, std::list<std::string> &callstack, bool isStruct);
|
||||
void initializeVarList(const Token *tok1, const Token *ftok, Var *varlist, std::list<std::string> &callstack);
|
||||
|
||||
/** @brief initialize a variable in the varlist */
|
||||
void initVar(Var *varlist, const std::string &varname);
|
||||
|
@ -158,15 +160,16 @@ private:
|
|||
/**
|
||||
* @brief get varlist from a class definition
|
||||
* @param tok1 pointer to class definition
|
||||
* @param withClasses if class variables should be extracted too.
|
||||
* @param isStruct is this a struct?
|
||||
*/
|
||||
Var *getVarList(const Token *tok1, bool withClasses, bool isStruct);
|
||||
Var *getVarList(const Token *tok1);
|
||||
|
||||
bool sameFunc(int nest, const Token *firstEnd, const Token *secondEnd);
|
||||
bool isMemberFunc(const Token *tok);
|
||||
bool isMemberVar(const std::string &classname, const Var *varlist, const Token *tok);
|
||||
bool checkConstFunc(const std::string &classname, const Var *varlist, const Token *tok);
|
||||
bool isMemberVar(const std::string &classname, const std::vector<std::string> &derivedFrom, const Var *varlist, const Token *tok);
|
||||
bool checkConstFunc(const std::string &classname, const std::vector<std::string> &derivedFrom, const Var *varlist, const Token *tok);
|
||||
|
||||
/** @brief check if this function is virtual in the base classes */
|
||||
bool isVirtual(const std::vector<std::string> &derivedFrom, const Token *functionToken) const;
|
||||
|
||||
/**
|
||||
* @brief Helper function for operatorEqRetRefThis that checks if there are errors
|
||||
|
|
|
@ -2186,11 +2186,32 @@ void CheckMemoryLeakInFunction::checkScope(const Token *Tok1, const std::string
|
|||
void CheckMemoryLeakInFunction::checkReallocUsage()
|
||||
{
|
||||
const Token *tok = _tokenizer->tokens();
|
||||
for (; tok; tok = tok->next())
|
||||
while ((tok = Token::findmatch(tok, ") const| {")))
|
||||
{
|
||||
if (Token::Match(tok, "%var% = realloc|g_try_realloc ( %var% ,"))
|
||||
// Record the varid's of the function parameters
|
||||
std::set<unsigned int> parameterVarIds;
|
||||
for (tok = tok->link(); tok && tok->str() != "{"; tok = tok->next())
|
||||
{
|
||||
if (tok->varId() == tok->tokAt(4)->varId())
|
||||
if (tok->varId() != 0)
|
||||
parameterVarIds.insert(tok->varId());
|
||||
}
|
||||
|
||||
// Search for the "var = realloc(var, 100);" pattern within this function
|
||||
unsigned int indentlevel = 0;
|
||||
for (tok = tok->next(); tok; tok = tok->next())
|
||||
{
|
||||
if (tok->str() == "{")
|
||||
++indentlevel;
|
||||
else if (tok->str() == "}")
|
||||
{
|
||||
if (indentlevel == 0)
|
||||
break;
|
||||
--indentlevel;
|
||||
}
|
||||
|
||||
if (Token::Match(tok, "%var% = realloc|g_try_realloc ( %var% ,") &&
|
||||
tok->varId() == tok->tokAt(4)->varId() &&
|
||||
parameterVarIds.find(tok->varId()) == parameterVarIds.end())
|
||||
{
|
||||
memleakUponReallocFailureError(tok, tok->str());
|
||||
}
|
||||
|
|
|
@ -3395,6 +3395,22 @@ private:
|
|||
// it is possible that the variable is initialized here
|
||||
if (Token::Match(tok2->previous(), "[(,] %var% [,)]"))
|
||||
bailouts.insert(tok2->varId());
|
||||
|
||||
// array initialization..
|
||||
if (Token::Match(tok2->previous(), "[,(] %var% +"))
|
||||
{
|
||||
// if var is array, bailout
|
||||
for (std::list<ExecutionPath *>::const_iterator it = checks.begin(); it != checks.end(); ++it)
|
||||
{
|
||||
if ((*it)->varId == tok2->varId())
|
||||
{
|
||||
const CheckUninitVar *c = dynamic_cast<const CheckUninitVar *>(*it);
|
||||
if (c && c->array)
|
||||
bailouts.insert(tok2->varId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3945,7 +3961,11 @@ void CheckOther::charBitOpError(const Token *tok)
|
|||
|
||||
void CheckOther::variableScopeError(const Token *tok, const std::string &varname)
|
||||
{
|
||||
reportError(tok, Severity::style, "variableScope", "The scope of the variable " + varname + " can be reduced");
|
||||
reportError(tok,
|
||||
Severity::style,
|
||||
"variableScope",
|
||||
"The scope of the variable " + varname + " can be reduced\n"
|
||||
"Be very careful when you reduce the scope! The logical behaviour can be changed by mistake, for example when reducing the scope in a loop.");
|
||||
}
|
||||
|
||||
void CheckOther::conditionAlwaysTrueFalse(const Token *tok, const std::string &truefalse)
|
||||
|
|
|
@ -90,7 +90,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer)
|
|||
// Multiple files => filename = "+"
|
||||
else if (func.filename != tokenizer.getFiles()->at(0))
|
||||
{
|
||||
func.filename = "+";
|
||||
//func.filename = "+";
|
||||
func.usedOtherFile |= func.usedSameFile;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// THIS FILE IS GENERATED BY MACHINE, SEE ../tools/errmsg.cpp !
|
||||
|
||||
#ifndef errorloggerH
|
||||
#define errorloggerH
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include "settings.h"
|
||||
|
@ -168,189 +168,6 @@ public:
|
|||
*/
|
||||
virtual void reportStatus(unsigned int index, unsigned int max) = 0;
|
||||
|
||||
static bool outOfBounds()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool stlOutOfBounds()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool noConstructor(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool uninitVar(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool unusedPrivateFunction(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool memsetClass()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool memsetStruct()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool operatorEq(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool virtualDestructor()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool mismatchAllocDealloc()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool memleak()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool resourceLeak()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool deallocDealloc()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool deallocuse()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool mismatchSize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool cstyleCast(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool redundantIfDelete0(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool redundantIfRemove(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool dangerousUsageStrtol()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ifNoAction(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool sprintfOverlappingData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool udivError()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool unusedStructMember(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool passedByValue(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
static bool constStatement(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool charArrayIndex(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool charBitOp(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool variableScope()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool conditionAlwaysTrueFalse(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool strPlusChar()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool returnLocalVariable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool dangerousFunctionmktemp(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool dangerousFunctiongets(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static bool dangerousFunctionscanf(const Settings &s)
|
||||
{
|
||||
return s._checkCodingStyle;
|
||||
}
|
||||
|
||||
|
||||
static std::string callStackToString(const std::list<ErrorLogger::ErrorMessage::FileLocation> &callStack);
|
||||
};
|
||||
|
||||
|
|
|
@ -192,6 +192,13 @@ static void checkExecutionPaths_(const Token *tok, std::list<ExecutionPath *> &c
|
|||
|
||||
if (tok->str() == "switch")
|
||||
{
|
||||
// parse condition
|
||||
if (checks.size() > 10 || check->parseCondition(*tok->next(), checks))
|
||||
{
|
||||
ExecutionPath::bailOut(checks);
|
||||
return;
|
||||
}
|
||||
|
||||
const Token *tok2 = tok->next()->link();
|
||||
if (Token::simpleMatch(tok2, ") { case"))
|
||||
{
|
||||
|
|
|
@ -1397,7 +1397,11 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
|
|||
if (headerType == 1 && !fileOpened)
|
||||
{
|
||||
filename = paths.back() + filename;
|
||||
fin.open(filename.c_str());
|
||||
|
||||
// Linux can't open include paths with \ separator, so fix them
|
||||
std::string fixedname(filename);
|
||||
std::replace(fixedname.begin(), fixedname.end(), '\\', '/');
|
||||
fin.open(fixedname.c_str());
|
||||
if (fin.is_open())
|
||||
{
|
||||
fileOpened = true;
|
||||
|
|
|
@ -359,8 +359,9 @@ void Tokenizer::createTokens(std::istream &code)
|
|||
{
|
||||
if (lineNumbers.empty() || fileIndexes.empty())
|
||||
{
|
||||
std::cerr << "####### Preprocessor bug! #######\n";
|
||||
std::exit(0);
|
||||
cppcheckError(0);
|
||||
deallocateTokens();
|
||||
return;
|
||||
}
|
||||
|
||||
lineno = lineNumbers.back();
|
||||
|
@ -5734,8 +5735,9 @@ bool Tokenizer::simplifyRedundantParanthesis()
|
|||
ret = true;
|
||||
}
|
||||
|
||||
if ((Token::simpleMatch(tok->previous(), "delete (") && Token::Match(tok->link(), ") ;|,")) ||
|
||||
(Token::simpleMatch(tok->previous(), "; (") && Token::Match(tok->link(), ") ;")))
|
||||
if (!Token::simpleMatch(tok->tokAt(-2), "operator delete") &&
|
||||
Token::Match(tok->previous(), "delete|; (") &&
|
||||
Token::Match(tok->link(), ") ;|,"))
|
||||
{
|
||||
tok->link()->deleteThis();
|
||||
tok->deleteThis();
|
||||
|
|
|
@ -52,6 +52,7 @@ private:
|
|||
TEST_CASE(uninitVar6);
|
||||
TEST_CASE(uninitVar7);
|
||||
TEST_CASE(uninitVar8);
|
||||
TEST_CASE(uninitVar9); // ticket #1730
|
||||
TEST_CASE(uninitVarEnum);
|
||||
TEST_CASE(uninitVarStream);
|
||||
TEST_CASE(uninitVarTypedef);
|
||||
|
@ -128,6 +129,8 @@ private:
|
|||
TEST_CASE(const24); // ticket #1708
|
||||
TEST_CASE(const25); // ticket #1724
|
||||
TEST_CASE(const26); // ticket #1847
|
||||
TEST_CASE(const27); // ticket #1882
|
||||
TEST_CASE(const28); // ticket #1883
|
||||
TEST_CASE(constoperator1); // operator< can often be const
|
||||
TEST_CASE(constoperator2); // operator<<
|
||||
TEST_CASE(constincdec); // increment/decrement => non-const
|
||||
|
@ -135,6 +138,7 @@ private:
|
|||
TEST_CASE(constDelete); // delete member variable => not const
|
||||
TEST_CASE(constLPVOID); // a function that returns LPVOID can't be const
|
||||
TEST_CASE(constFunc); // a function that calls const functions can be const
|
||||
TEST_CASE(constVirtualFunc);
|
||||
}
|
||||
|
||||
// Check the operator Equal
|
||||
|
@ -1583,6 +1587,21 @@ private:
|
|||
ASSERT_EQUALS("[test.cpp:8]: (style) Member variable 'Foo::a' is not assigned a value in 'Foo::operator='\n", errout.str());
|
||||
}
|
||||
|
||||
void uninitVar9() // ticket #1730
|
||||
{
|
||||
checkUninitVar("class Prefs {\n"
|
||||
"private:\n"
|
||||
" int xasd;\n"
|
||||
"public:\n"
|
||||
" Prefs(wxSize size);\n"
|
||||
"};\n"
|
||||
"Prefs::Prefs(wxSize size)\n"
|
||||
"{\n"
|
||||
" SetMinSize( wxSize( 48,48 ) );\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("[test.cpp:7]: (style) Member variable not initialized in the constructor 'Prefs::xasd'\n", errout.str());
|
||||
}
|
||||
|
||||
void uninitVarArray1()
|
||||
{
|
||||
checkUninitVar("class John\n"
|
||||
|
@ -3594,6 +3613,45 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void const28() // ticket #1883
|
||||
{
|
||||
checkConst("class P {\n"
|
||||
"public:\n"
|
||||
" P() { x=0.0; y=0.0; }\n"
|
||||
" double x,y;\n"
|
||||
"};\n"
|
||||
"class A : public P {\n"
|
||||
"public:\n"
|
||||
" A():P(){}\n"
|
||||
" void SetPos(double xPos, double yPos) {\n"
|
||||
" x=xPos;\n"
|
||||
" y=yPos;\n"
|
||||
" }\n"
|
||||
"};\n"
|
||||
);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void const27() // ticket #1882
|
||||
{
|
||||
checkConst("class A {\n"
|
||||
"public:\n"
|
||||
" A(){m_d=1.0; m_iRealVal=2.0;}\n"
|
||||
" double dGetValue();\n"
|
||||
"private:\n"
|
||||
" double m_d;\n"
|
||||
" double m_iRealVal;\n"
|
||||
"};\n"
|
||||
"double A::dGetValue() {\n"
|
||||
" double dRet = m_iRealVal;\n"
|
||||
" if( m_d != 0 )\n"
|
||||
" return dRet / m_d;\n"
|
||||
" return dRet;\n"
|
||||
"};\n"
|
||||
);
|
||||
ASSERT_EQUALS("[test.cpp:9] -> [test.cpp:4]: (style) The function 'A::dGetValue' can be const\n", errout.str());
|
||||
}
|
||||
|
||||
// increment/decrement => not const
|
||||
void constincdec()
|
||||
{
|
||||
|
@ -3660,6 +3718,114 @@ private:
|
|||
"}");
|
||||
TODO_ASSERT_EQUALS("[test.cpp:7]: (style) The function 'A::GetVecSize' can be const\n", errout.str());
|
||||
}
|
||||
|
||||
void constVirtualFunc()
|
||||
{
|
||||
// base class has no virtual function
|
||||
checkConst("class A { };\n"
|
||||
"class B : public A {\n"
|
||||
" int b;\n"
|
||||
"public:\n"
|
||||
" B() : b(0) { }\n"
|
||||
" int func() { return b; }\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("[test.cpp:6]: (style) The function 'B::func' can be const\n", errout.str());
|
||||
|
||||
// base class has no virtual function
|
||||
checkConst("class A {\n"
|
||||
"public:\n"
|
||||
" int func();\n"
|
||||
"};\n"
|
||||
"class B : public A {\n"
|
||||
" int b;\n"
|
||||
"public:\n"
|
||||
" B() : b(0) { }\n"
|
||||
" int func() { return b; }\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("[test.cpp:9]: (style) The function 'B::func' can be const\n", errout.str());
|
||||
|
||||
// base class has virtual function
|
||||
checkConst("class A {\n"
|
||||
"public:\n"
|
||||
" virtual int func();\n"
|
||||
"};\n"
|
||||
"class B : public A {\n"
|
||||
" int b;\n"
|
||||
"public:\n"
|
||||
" B() : b(0) { }\n"
|
||||
" int func() { return b; }\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// base class has no virtual function
|
||||
checkConst("class A {\n"
|
||||
" int a;\n"
|
||||
"public:\n"
|
||||
" A() : a(0) { }\n"
|
||||
" int func() { return a; }\n"
|
||||
"};\n"
|
||||
"class B : public A {\n"
|
||||
" int b;\n"
|
||||
"public:\n"
|
||||
" B() : b(0) { }\n"
|
||||
" int func() { return b; }\n"
|
||||
"};\n"
|
||||
"class C : public B {\n"
|
||||
" int c;\n"
|
||||
"public:\n"
|
||||
" C() : c(0) { }\n"
|
||||
" int func() { return c; }\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("[test.cpp:5]: (style) The function 'A::func' can be const\n"
|
||||
"[test.cpp:11]: (style) The function 'B::func' can be const\n"
|
||||
"[test.cpp:17]: (style) The function 'C::func' can be const\n", errout.str());
|
||||
|
||||
// base class has virtual function
|
||||
checkConst("class A {\n"
|
||||
" int a;\n"
|
||||
"public:\n"
|
||||
" A() : a(0) { }\n"
|
||||
" virtual int func() { return a; }\n"
|
||||
"};\n"
|
||||
"class B : public A {\n"
|
||||
" int b;\n"
|
||||
"public:\n"
|
||||
" B() : b(0) { }\n"
|
||||
" int func() { return b; }\n"
|
||||
"};\n"
|
||||
"class C : public B {\n"
|
||||
" int c;\n"
|
||||
"public:\n"
|
||||
" C() : c(0) { }\n"
|
||||
" int func() { return c; }\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// ticket #1311
|
||||
checkConst("class X {\n"
|
||||
" int x;\n"
|
||||
"public:\n"
|
||||
" X(int x) : x(x) { }\n"
|
||||
" int getX() { return x; }\n"
|
||||
"};\n"
|
||||
"class Y : public X {\n"
|
||||
" int y;\n"
|
||||
"public:\n"
|
||||
" Y(int x, int y) : X(x), y(y) { }\n"
|
||||
" int getY() { return y; }\n"
|
||||
"};\n"
|
||||
"class Z : public Y {\n"
|
||||
" int z;\n"
|
||||
"public:\n"
|
||||
" Z(int x, int y, int z) : Y(x, y), z(z) { }\n"
|
||||
" int getZ() { return z; }\n"
|
||||
"};\n"
|
||||
" }\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("[test.cpp:5]: (style) The function 'X::getX' can be const\n"
|
||||
"[test.cpp:11]: (style) The function 'Y::getY' can be const\n"
|
||||
"[test.cpp:17]: (style) The function 'Z::getZ' can be const\n", errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestClass)
|
||||
|
|
|
@ -733,6 +733,63 @@ private:
|
|||
"[test.cpp:21]: (style) Member variable not initialized in the constructor 'B::b'\n"
|
||||
"[test.cpp:22]: (style) Member variable not initialized in the constructor 'C::c'\n"
|
||||
"[test.cpp:23]: (style) Member variable not initialized in the constructor 'D::d'\n", errout.str());
|
||||
|
||||
check("class A {\n"
|
||||
"public:\n"
|
||||
" A();\n"
|
||||
" struct B {\n"
|
||||
" B();\n"
|
||||
" struct C {\n"
|
||||
" C();\n"
|
||||
" struct D {\n"
|
||||
" D(const D &);\n"
|
||||
" int d;\n"
|
||||
" };\n"
|
||||
" int c;\n"
|
||||
" };\n"
|
||||
" int b;\n"
|
||||
" };\n"
|
||||
"private:\n"
|
||||
" int a;\n"
|
||||
" B b;\n"
|
||||
"};\n"
|
||||
"A::A(){}\n"
|
||||
"A::B::B(){}\n"
|
||||
"A::B::C::C(){}\n"
|
||||
"A::B::C::D::D(const A::B::C::D & d){}\n");
|
||||
ASSERT_EQUALS("[test.cpp:20]: (style) Member variable not initialized in the constructor 'A::a'\n"
|
||||
"[test.cpp:21]: (style) Member variable not initialized in the constructor 'B::b'\n"
|
||||
"[test.cpp:22]: (style) Member variable not initialized in the constructor 'C::c'\n"
|
||||
"[test.cpp:23]: (style) Member variable not initialized in the constructor 'D::d'\n", errout.str());
|
||||
|
||||
check("class A {\n"
|
||||
"public:\n"
|
||||
" A();\n"
|
||||
" struct B {\n"
|
||||
" B();\n"
|
||||
" struct C {\n"
|
||||
" C();\n"
|
||||
" struct D {\n"
|
||||
" struct E { };\n"
|
||||
" E d;\n"
|
||||
" D(const E &);\n"
|
||||
" };\n"
|
||||
" int c;\n"
|
||||
" };\n"
|
||||
" int b;\n"
|
||||
" };\n"
|
||||
"private:\n"
|
||||
" int a;\n"
|
||||
" B b;\n"
|
||||
"};\n"
|
||||
"A::A(){}\n"
|
||||
"A::B::B(){}\n"
|
||||
"A::B::C::C(){}\n"
|
||||
"A::B::C::D::D(const A::B::C::D::E & e){}\n");
|
||||
ASSERT_EQUALS("[test.cpp:21]: (style) Member variable not initialized in the constructor 'A::a'\n"
|
||||
"[test.cpp:22]: (style) Member variable not initialized in the constructor 'B::b'\n"
|
||||
"[test.cpp:23]: (style) Member variable not initialized in the constructor 'C::c'\n"
|
||||
"[test.cpp:24]: (style) Member variable not initialized in the constructor 'D::d'\n", errout.str());
|
||||
}
|
||||
|
||||
void initvar_destructor()
|
||||
|
|
|
@ -40,6 +40,7 @@ private:
|
|||
TEST_CASE(test2);
|
||||
TEST_CASE(test3);
|
||||
TEST_CASE(test4);
|
||||
TEST_CASE(test5);
|
||||
}
|
||||
|
||||
void check(const char code[])
|
||||
|
@ -104,6 +105,21 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void test5() //#ticket 1879
|
||||
{
|
||||
check("void test()\n"
|
||||
"{\n"
|
||||
" int *a = new int[10];\n"
|
||||
" try\n"
|
||||
" {\n"
|
||||
" }\n"
|
||||
" catch(...)\n"
|
||||
" {\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("[test.cpp:10]: (error) Memory leak: a\n",errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
static TestLocalLeaks testLocalLeaks;
|
||||
|
@ -313,6 +329,7 @@ private:
|
|||
TEST_CASE(realloc4);
|
||||
TEST_CASE(realloc5);
|
||||
TEST_CASE(realloc6);
|
||||
TEST_CASE(realloc7);
|
||||
|
||||
TEST_CASE(assign);
|
||||
|
||||
|
@ -1996,6 +2013,21 @@ private:
|
|||
ASSERT_EQUALS(";;alloc;", getcode("char *buf; buf=realloc(0,100);", "buf"));
|
||||
}
|
||||
|
||||
void realloc7()
|
||||
{
|
||||
check("bool foo(size_t nLen, char* pData)\n"
|
||||
"{\n"
|
||||
" pData = (char*) realloc(pData, sizeof(char) + (nLen + 1)*sizeof(char));\n"
|
||||
" if ( pData == NULL )\n"
|
||||
" {\n"
|
||||
" return false;\n"
|
||||
" }\n"
|
||||
" free(pData);\n"
|
||||
" return true;\n"
|
||||
"}\n", false);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void assign()
|
||||
{
|
||||
check("void foo()\n"
|
||||
|
|
|
@ -1834,6 +1834,18 @@ private:
|
|||
" } catch (...) {\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
|
||||
// #1855 - switch(foo(&x))
|
||||
checkUninitVar("int a()\n"
|
||||
"{\n"
|
||||
" int x;\n"
|
||||
" switch (foo(&x))\n"
|
||||
" {\n"
|
||||
" case 1:\n"
|
||||
" return x;\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
// arrays..
|
||||
|
@ -1909,6 +1921,16 @@ private:
|
|||
" strchr(s, ' ');\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("[test.cpp:4]: (error) Uninitialized variable: s\n", errout.str());
|
||||
|
||||
checkUninitVar("void foo()\n"
|
||||
"{\n"
|
||||
" int y[2];\n"
|
||||
" int s;\n"
|
||||
" GetField( y + 0, \n"
|
||||
" y + 1 );\n"
|
||||
" s = y[0]*y[1];\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
// alloc..
|
||||
|
|
|
@ -172,6 +172,7 @@ private:
|
|||
TEST_CASE(removeParantheses5); // Ticket #392
|
||||
TEST_CASE(removeParantheses6);
|
||||
TEST_CASE(removeParantheses7);
|
||||
TEST_CASE(removeParantheses8); // Ticket #1865
|
||||
|
||||
TEST_CASE(tokenize_double);
|
||||
TEST_CASE(tokenize_strings);
|
||||
|
@ -3014,6 +3015,20 @@ private:
|
|||
ASSERT_EQUALS(" ; delete p ; ( p ) = 0 ;", ostr.str());
|
||||
}
|
||||
|
||||
void removeParantheses8()
|
||||
{
|
||||
const char code[] = "struct foo {\n"
|
||||
" void operator delete(void *obj, size_t sz);\n"
|
||||
"}\n";
|
||||
const std::string actual(tokenizeAndStringify(code));
|
||||
|
||||
const char expected[] = "struct foo {\n"
|
||||
"void operator delete ( void * obj , size_t sz ) ;\n"
|
||||
"}";
|
||||
|
||||
ASSERT_EQUALS(expected, actual);
|
||||
}
|
||||
|
||||
void tokenize_double()
|
||||
{
|
||||
const char code[] = "void f()\n"
|
||||
|
|
|
@ -45,6 +45,8 @@ private:
|
|||
TEST_CASE(throwIsNotAFunction);
|
||||
TEST_CASE(unusedError);
|
||||
TEST_CASE(initializationIsNotAFunction);
|
||||
|
||||
TEST_CASE(multipleFiles); // same function name in multiple files
|
||||
}
|
||||
|
||||
void check(const char code[])
|
||||
|
@ -181,6 +183,33 @@ private:
|
|||
"};\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void multipleFiles()
|
||||
{
|
||||
CheckUnusedFunctions c;
|
||||
|
||||
// Clear the error buffer..
|
||||
errout.str("");
|
||||
|
||||
const char code[] = "static void f() { }";
|
||||
|
||||
for (int i = 1; i <= 2; ++i)
|
||||
{
|
||||
std::ostringstream fname;
|
||||
fname << "test" << i << ".cpp";
|
||||
|
||||
Tokenizer tokenizer;
|
||||
std::istringstream istr(code);
|
||||
tokenizer.tokenize(istr, fname.str().c_str());
|
||||
|
||||
c.parseTokens(tokenizer);
|
||||
}
|
||||
|
||||
// Check for unused functions..
|
||||
c.check(this);
|
||||
|
||||
ASSERT_EQUALS("[test1.cpp:1]: (style) The function 'f' is never used\n",errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestUnusedFunctions)
|
||||
|
|
Loading…
Reference in New Issue