fixed compiler error when building gui
This commit is contained in:
parent
48669e61a1
commit
fa14dcbf68
|
@ -503,12 +503,8 @@ void MainWindow::About()
|
|||
{
|
||||
//TODO make a "GetVersionNumber" function to core cppcheck
|
||||
CppCheckExecutor exec;
|
||||
CppCheck check(exec);
|
||||
const char *argv[] = {"", "--version"};
|
||||
QString version = check.parseFromArgs(2, argv).c_str();
|
||||
version.replace("Cppcheck ", "");
|
||||
|
||||
AboutDialog *dlg = new AboutDialog(version, this);
|
||||
const CppCheck check(exec);
|
||||
AboutDialog *dlg = new AboutDialog(check.version(), this);
|
||||
dlg->exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,10 @@ void CppCheck::clearFiles()
|
|||
|
||||
|
||||
|
||||
const char * CppCheck::version() const
|
||||
{
|
||||
return "1.37";
|
||||
}
|
||||
|
||||
void CppCheck::parseFromArgs(int argc, const char* const argv[])
|
||||
{
|
||||
|
@ -87,7 +91,7 @@ void CppCheck::parseFromArgs(int argc, const char* const argv[])
|
|||
{
|
||||
if (strcmp(argv[i], "--version") == 0)
|
||||
{
|
||||
reportOut("Cppcheck 1.37");
|
||||
reportOut(std::string("Cppcheck ") + version());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,8 @@ public:
|
|||
*/
|
||||
void parseFromArgs(int argc, const char* const argv[]);
|
||||
|
||||
const char * version() const;
|
||||
|
||||
const std::vector<std::string> &filenames() const;
|
||||
|
||||
virtual void reportStatus(unsigned int index, unsigned int max);
|
||||
|
|
Loading…
Reference in New Issue