Refactoring: Make Cppcheck::version() static
Update codeblocks projectfile
This commit is contained in:
parent
d4f706e040
commit
1ee28ba444
90
cppcheck.cbp
90
cppcheck.cbp
|
@ -9,7 +9,7 @@
|
|||
<Build>
|
||||
<Target title="cppcheck">
|
||||
<Option output="cppcheck" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="/home/nobackup/cppcheck/.objs" />
|
||||
<Option object_output=".objs" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
|
@ -18,7 +18,7 @@
|
|||
</Target>
|
||||
<Target title="testrunner">
|
||||
<Option output="testrunner" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="/home/nobackup/cppcheck/.objs" />
|
||||
<Option object_output=".objs" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
|
@ -68,49 +68,49 @@
|
|||
<Unit filename="gui/txtreport.h" />
|
||||
<Unit filename="gui/xmlreport.cpp" />
|
||||
<Unit filename="gui/xmlreport.h" />
|
||||
<Unit filename="src/check.h" />
|
||||
<Unit filename="src/checkautovariables.cpp" />
|
||||
<Unit filename="src/checkautovariables.h" />
|
||||
<Unit filename="src/checkbufferoverrun.cpp" />
|
||||
<Unit filename="src/checkbufferoverrun.h" />
|
||||
<Unit filename="src/checkclass.cpp" />
|
||||
<Unit filename="src/checkclass.h" />
|
||||
<Unit filename="src/checkdangerousfunctions.cpp" />
|
||||
<Unit filename="src/checkdangerousfunctions.h" />
|
||||
<Unit filename="src/checkheaders.cpp" />
|
||||
<Unit filename="src/checkheaders.h" />
|
||||
<Unit filename="src/checkmemoryleak.cpp" />
|
||||
<Unit filename="src/checkmemoryleak.h" />
|
||||
<Unit filename="src/checkother.cpp" />
|
||||
<Unit filename="src/checkother.h" />
|
||||
<Unit filename="src/checksecurity.cpp" />
|
||||
<Unit filename="src/checksecurity.h" />
|
||||
<Unit filename="src/checkstl.cpp" />
|
||||
<Unit filename="src/checkstl.h" />
|
||||
<Unit filename="src/checkunusedfunctions.cpp" />
|
||||
<Unit filename="src/checkunusedfunctions.h" />
|
||||
<Unit filename="src/classinfo.h" />
|
||||
<Unit filename="src/cppcheck.cpp" />
|
||||
<Unit filename="src/cppcheck.h" />
|
||||
<Unit filename="src/cppcheckexecutor.cpp" />
|
||||
<Unit filename="src/cppcheckexecutor.h" />
|
||||
<Unit filename="src/errorlogger.cpp" />
|
||||
<Unit filename="src/errorlogger.h" />
|
||||
<Unit filename="src/filelister.cpp" />
|
||||
<Unit filename="src/filelister.h" />
|
||||
<Unit filename="src/main.cpp" />
|
||||
<Unit filename="src/mathlib.cpp" />
|
||||
<Unit filename="src/mathlib.h" />
|
||||
<Unit filename="src/preprocessor.cpp" />
|
||||
<Unit filename="src/preprocessor.h" />
|
||||
<Unit filename="src/settings.cpp" />
|
||||
<Unit filename="src/settings.h" />
|
||||
<Unit filename="src/threadexecutor.cpp" />
|
||||
<Unit filename="src/threadexecutor.h" />
|
||||
<Unit filename="src/token.cpp" />
|
||||
<Unit filename="src/token.h" />
|
||||
<Unit filename="src/tokenize.cpp" />
|
||||
<Unit filename="src/tokenize.h" />
|
||||
<Unit filename="lib/check.h" />
|
||||
<Unit filename="lib/checkautovariables.cpp" />
|
||||
<Unit filename="lib/checkautovariables.h" />
|
||||
<Unit filename="lib/checkbufferoverrun.cpp" />
|
||||
<Unit filename="lib/checkbufferoverrun.h" />
|
||||
<Unit filename="lib/checkclass.cpp" />
|
||||
<Unit filename="lib/checkclass.h" />
|
||||
<Unit filename="lib/checkdangerousfunctions.cpp" />
|
||||
<Unit filename="lib/checkdangerousfunctions.h" />
|
||||
<Unit filename="lib/checkheaders.cpp" />
|
||||
<Unit filename="lib/checkheaders.h" />
|
||||
<Unit filename="lib/checkmemoryleak.cpp" />
|
||||
<Unit filename="lib/checkmemoryleak.h" />
|
||||
<Unit filename="lib/checkother.cpp" />
|
||||
<Unit filename="lib/checkother.h" />
|
||||
<Unit filename="lib/checksecurity.cpp" />
|
||||
<Unit filename="lib/checksecurity.h" />
|
||||
<Unit filename="lib/checkstl.cpp" />
|
||||
<Unit filename="lib/checkstl.h" />
|
||||
<Unit filename="lib/checkunusedfunctions.cpp" />
|
||||
<Unit filename="lib/checkunusedfunctions.h" />
|
||||
<Unit filename="lib/classinfo.h" />
|
||||
<Unit filename="lib/cppcheck.cpp" />
|
||||
<Unit filename="lib/cppcheck.h" />
|
||||
<Unit filename="lib/cppcheckexecutor.cpp" />
|
||||
<Unit filename="lib/cppcheckexecutor.h" />
|
||||
<Unit filename="lib/errorlogger.cpp" />
|
||||
<Unit filename="lib/errorlogger.h" />
|
||||
<Unit filename="lib/filelister.cpp" />
|
||||
<Unit filename="lib/filelister.h" />
|
||||
<Unit filename="cli/main.cpp" />
|
||||
<Unit filename="lib/mathlib.cpp" />
|
||||
<Unit filename="lib/mathlib.h" />
|
||||
<Unit filename="lib/preprocessor.cpp" />
|
||||
<Unit filename="lib/preprocessor.h" />
|
||||
<Unit filename="lib/settings.cpp" />
|
||||
<Unit filename="lib/settings.h" />
|
||||
<Unit filename="lib/threadexecutor.cpp" />
|
||||
<Unit filename="lib/threadexecutor.h" />
|
||||
<Unit filename="lib/token.cpp" />
|
||||
<Unit filename="lib/token.h" />
|
||||
<Unit filename="lib/tokenize.cpp" />
|
||||
<Unit filename="lib/tokenize.h" />
|
||||
<Unit filename="test/testautovariables.cpp" />
|
||||
<Unit filename="test/testbufferoverrun.cpp" />
|
||||
<Unit filename="test/testcharvar.cpp" />
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "projectfile.h"
|
||||
#include "report.h"
|
||||
#include "../lib/filelister.h"
|
||||
#include "../lib/cppcheckexecutor.h"
|
||||
|
||||
MainWindow::MainWindow() :
|
||||
mSettings(new QSettings("Cppcheck", "Cppcheck-GUI", this)),
|
||||
|
@ -501,10 +500,7 @@ void MainWindow::ToggleAllChecked(bool checked)
|
|||
|
||||
void MainWindow::About()
|
||||
{
|
||||
//TODO make a "GetVersionNumber" function to core cppcheck
|
||||
CppCheckExecutor exec;
|
||||
const CppCheck check(exec);
|
||||
AboutDialog *dlg = new AboutDialog(check.version(), this);
|
||||
AboutDialog *dlg = new AboutDialog(CppCheck::version(), this);
|
||||
dlg->exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -76,9 +76,7 @@ void CppCheck::clearFiles()
|
|||
_fileContents.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char * CppCheck::version() const
|
||||
const char * CppCheck::version()
|
||||
{
|
||||
return "1.38";
|
||||
}
|
||||
|
|
|
@ -106,7 +106,11 @@ public:
|
|||
*/
|
||||
void parseFromArgs(int argc, const char* const argv[]);
|
||||
|
||||
const char * version() const;
|
||||
/**
|
||||
* Returns current version number as a string.
|
||||
* @return version, e.g. "1.38"
|
||||
*/
|
||||
static const char * version();
|
||||
|
||||
const std::vector<std::string> &filenames() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue