Cppcheck
Classes | Macros | Functions
GUI

Classes

class  AboutDialog
 About dialog. More...
 
class  ApplicationDialog
 Dialog to edit a startable application. More...
 
class  ApplicationList
 List of applications user has specified to open errors with. More...
 
class  CheckStatistics
 A class for check statistics. More...
 
class  CheckThread
 Thread to run cppcheck. More...
 
class  CsvReport
 CSV text file report. More...
 
class  GuiSeverity
 GUI versions of severity conversions. More...
 
class  QErrorPathItem
 A class containing data for one error path item. More...
 
class  ErrorItem
 A class containing error data for one error. More...
 
class  ErrorLine
 A class containing error data for one shown error line. More...
 
class  FileViewDialog
 File view -dialog. More...
 
class  MainWindow
 Main window for cppcheck-gui. More...
 
struct  PlatformData
 Checked platform GUI-data. More...
 
class  Platforms
 List of checked platforms. More...
 
class  PrintableReport
 Printable (in-memory) report. More...
 
class  ProjectFile
 A class that reads and writes project files. More...
 
class  ProjectFileDialog
 A dialog for editing project file data. More...
 
class  Report
 A base class for reports. More...
 
class  ResultsTree
 Cppcheck's results are shown in this tree. More...
 
class  ResultsView
 Widget to show cppcheck progressbar and result. More...
 
class  ScratchPad
 A window with a text field that . More...
 
class  SettingsDialog
 Settings dialog. More...
 
class  ShowTypes
 A class for different show types we have. More...
 
class  StatsDialog
 A dialog that shows project and scan statistics. More...
 
class  ThreadHandler
 This class handles creating threadresult and starting threads. More...
 
class  ThreadResult
 Threads use this class to obtain new files to process and to publish results. More...
 
struct  TranslationInfo
 Information for one translation. More...
 
class  TranslationHandler
 A class handling the available translations. More...
 
class  TxtReport
 Text file report. More...
 
class  XmlReport
 Base class for XML report classes. More...
 
class  XmlReportV2
 XML file report version 2. More...
 

Macros

#define CLANG_ANALYZER   "clang-analyzer"
 
#define CLANG_TIDY   "clang-tidy"
 
#define SETTINGS_WINDOW_MAXIMIZED   "Window maximized"
 QSetting value names. More...
 
#define SETTINGS_WINDOW_WIDTH   "Window width"
 
#define SETTINGS_WINDOW_HEIGHT   "Window height"
 
#define SETTINGS_MAINWND_SPLITTER_STATE   "Mainwindow/Vertical splitter state"
 
#define SETTINGS_CHECK_DIALOG_WIDTH   "Check dialog width"
 
#define SETTINGS_CHECK_DIALOG_HEIGHT   "Check dialog height"
 
#define SETTINGS_PROJECT_DIALOG_WIDTH   "Project dialog width"
 
#define SETTINGS_PROJECT_DIALOG_HEIGHT   "Project dialog height"
 
#define SETTINGS_RESULT_COLUMN_WIDTH   "Result column %1 width"
 
#define SETTINGS_TOOLBARS_MAIN_SHOW   "Toolbars/ShowStandard"
 
#define SETTINGS_TOOLBARS_VIEW_SHOW   "Toolbars/ShowView"
 
#define SETTINGS_TOOLBARS_FILTER_SHOW   "Toolbars/ShowFilter"
 
#define SETTINGS_SHOW_STYLE   "Show style"
 
#define SETTINGS_SHOW_ERRORS   "Show errors"
 
#define SETTINGS_SHOW_WARNINGS   "Show warnings"
 
#define SETTINGS_SHOW_PERFORMANCE   "Show performance"
 
#define SETTINGS_SHOW_INFORMATION   "Show information"
 
#define SETTINGS_SHOW_PORTABILITY   "Show portability"
 
#define SETTINGS_STD_CPP   "Standard CPP"
 
#define SETTINGS_STD_C   "Standard C"
 
#define SETTINGS_ENFORCED_LANGUAGE   "Enforced language"
 
#define SETTINGS_CHECK_FORCE   "Check force"
 
#define SETTINGS_CHECK_THREADS   "Check threads"
 
#define SETTINGS_SHOW_FULL_PATH   "Show full path"
 
#define SETTINGS_SHOW_NO_ERRORS   "Show no errors message"
 
#define SETTINGS_SHOW_DEBUG_WARNINGS   "Show debug warnings"
 
#define SETTINGS_SAVE_ALL_ERRORS   "Save all errors"
 
#define SETTINGS_SAVE_FULL_PATH   "Save full path"
 
#define SETTINGS_APPLICATION_NAMES   "Application names"
 
#define SETTINGS_APPLICATION_PATHS   "Application paths"
 
#define SETTINGS_APPLICATION_PARAMS   "Application parameters"
 
#define SETTINGS_APPLICATION_DEFAULT   "Default Application"
 
#define SETTINGS_LANGUAGE   "Application language"
 
#define SETTINGS_GLOBAL_INCLUDE_PATHS   "Global include paths"
 
#define SETTINGS_PYTHON_PATH   "Python path"
 
#define SETTINGS_MISRA_FILE   "MISRA C 2012 file"
 
#define SETTINGS_CLANG_PATH   "Clang path"
 
#define SETTINGS_VS_INCLUDE_PATHS   "VS include paths"
 
#define SETTINGS_INLINE_SUPPRESSIONS   "Inline suppressions"
 
#define SETTINGS_INCONCLUSIVE_ERRORS   "Inconclusive errors"
 
#define SETTINGS_MRU_PROJECTS   "MRU Projects"
 
#define SETTINGS_SHOW_ERROR_ID   "Show error Id"
 
#define SETTINGS_SHOW_STATISTICS   "Show statistics"
 
#define SETTINGS_OPEN_PROJECT   "Open Project"
 
#define SETTINGS_CHECK_VERSION   "Check Version"
 
#define SETTINGS_CHECK_FOR_UPDATES   "Check for updates"
 
#define PROGRESS_MAX   1024.0
 
#define SETTINGS_CHECKED_PLATFORM   "Checked platform"
 
#define SETTINGS_LAST_CHECK_PATH   "Last check path"
 
#define SETTINGS_LAST_PROJECT_PATH   "Last project path"
 
#define SETTINGS_LAST_RESULT_PATH   "Last result path"
 
#define SETTINGS_LAST_SOURCE_PATH   "Last source path"
 
#define SETTINGS_LAST_APP_PATH   "Last application path"
 
#define SETTINGS_LAST_ANALYZE_FILES_FILTER   "Last analyze files filter"
 

Functions

QString getPath (const QString &type)
 Obtains the path of specified type Returns the path of specified type if not empty. More...
 
void setPath (const QString &type, const QString &value)
 Stores last used path of specified type Stores provided path as last used path for specified type. More...
 
QString toFilterString (const QMap< QString, QString > &filters, bool addAllSupported=true, bool addAll=true)
 Creates a string suitable for passing as the filter argument to methods like QFileDialog::getOpenFileName. More...
 
QString getDataDir ()
 Get configured data dir. More...
 
bool operator== (const QErrorPathItem &i1, const QErrorPathItem &i2)
 

Detailed Description

Macro Definition Documentation

◆ CLANG_ANALYZER

#define CLANG_ANALYZER   "clang-analyzer"

Definition at line 28 of file common.h.

◆ CLANG_TIDY

#define CLANG_TIDY   "clang-tidy"

Definition at line 29 of file common.h.

◆ PROGRESS_MAX

#define PROGRESS_MAX   1024.0

Definition at line 94 of file common.h.

◆ SETTINGS_APPLICATION_DEFAULT

#define SETTINGS_APPLICATION_DEFAULT   "Default Application"

Definition at line 77 of file common.h.

◆ SETTINGS_APPLICATION_NAMES

#define SETTINGS_APPLICATION_NAMES   "Application names"

Definition at line 74 of file common.h.

◆ SETTINGS_APPLICATION_PARAMS

#define SETTINGS_APPLICATION_PARAMS   "Application parameters"

Definition at line 76 of file common.h.

◆ SETTINGS_APPLICATION_PATHS

#define SETTINGS_APPLICATION_PATHS   "Application paths"

Definition at line 75 of file common.h.

◆ SETTINGS_CHECK_DIALOG_HEIGHT

#define SETTINGS_CHECK_DIALOG_HEIGHT   "Check dialog height"

Definition at line 41 of file common.h.

◆ SETTINGS_CHECK_DIALOG_WIDTH

#define SETTINGS_CHECK_DIALOG_WIDTH   "Check dialog width"

Definition at line 40 of file common.h.

◆ SETTINGS_CHECK_FOR_UPDATES

#define SETTINGS_CHECK_FOR_UPDATES   "Check for updates"

Definition at line 91 of file common.h.

◆ SETTINGS_CHECK_FORCE

#define SETTINGS_CHECK_FORCE   "Check force"

Definition at line 67 of file common.h.

◆ SETTINGS_CHECK_THREADS

#define SETTINGS_CHECK_THREADS   "Check threads"

Definition at line 68 of file common.h.

◆ SETTINGS_CHECK_VERSION

#define SETTINGS_CHECK_VERSION   "Check Version"

Definition at line 90 of file common.h.

◆ SETTINGS_CHECKED_PLATFORM

#define SETTINGS_CHECKED_PLATFORM   "Checked platform"

Definition at line 96 of file common.h.

◆ SETTINGS_CLANG_PATH

#define SETTINGS_CLANG_PATH   "Clang path"

Definition at line 82 of file common.h.

◆ SETTINGS_ENFORCED_LANGUAGE

#define SETTINGS_ENFORCED_LANGUAGE   "Enforced language"

Definition at line 64 of file common.h.

◆ SETTINGS_GLOBAL_INCLUDE_PATHS

#define SETTINGS_GLOBAL_INCLUDE_PATHS   "Global include paths"

Definition at line 79 of file common.h.

◆ SETTINGS_INCONCLUSIVE_ERRORS

#define SETTINGS_INCONCLUSIVE_ERRORS   "Inconclusive errors"

Definition at line 85 of file common.h.

◆ SETTINGS_INLINE_SUPPRESSIONS

#define SETTINGS_INLINE_SUPPRESSIONS   "Inline suppressions"

Definition at line 84 of file common.h.

◆ SETTINGS_LANGUAGE

#define SETTINGS_LANGUAGE   "Application language"

Definition at line 78 of file common.h.

◆ SETTINGS_LAST_ANALYZE_FILES_FILTER

#define SETTINGS_LAST_ANALYZE_FILES_FILTER   "Last analyze files filter"

Definition at line 104 of file common.h.

◆ SETTINGS_LAST_APP_PATH

#define SETTINGS_LAST_APP_PATH   "Last application path"

Definition at line 102 of file common.h.

◆ SETTINGS_LAST_CHECK_PATH

#define SETTINGS_LAST_CHECK_PATH   "Last check path"

Definition at line 98 of file common.h.

◆ SETTINGS_LAST_PROJECT_PATH

#define SETTINGS_LAST_PROJECT_PATH   "Last project path"

Definition at line 99 of file common.h.

◆ SETTINGS_LAST_RESULT_PATH

#define SETTINGS_LAST_RESULT_PATH   "Last result path"

Definition at line 100 of file common.h.

◆ SETTINGS_LAST_SOURCE_PATH

#define SETTINGS_LAST_SOURCE_PATH   "Last source path"

Definition at line 101 of file common.h.

◆ SETTINGS_MAINWND_SPLITTER_STATE

#define SETTINGS_MAINWND_SPLITTER_STATE   "Mainwindow/Vertical splitter state"

Definition at line 39 of file common.h.

◆ SETTINGS_MISRA_FILE

#define SETTINGS_MISRA_FILE   "MISRA C 2012 file"

Definition at line 81 of file common.h.

◆ SETTINGS_MRU_PROJECTS

#define SETTINGS_MRU_PROJECTS   "MRU Projects"

Definition at line 86 of file common.h.

◆ SETTINGS_OPEN_PROJECT

#define SETTINGS_OPEN_PROJECT   "Open Project"

Definition at line 89 of file common.h.

◆ SETTINGS_PROJECT_DIALOG_HEIGHT

#define SETTINGS_PROJECT_DIALOG_HEIGHT   "Project dialog height"

Definition at line 43 of file common.h.

◆ SETTINGS_PROJECT_DIALOG_WIDTH

#define SETTINGS_PROJECT_DIALOG_WIDTH   "Project dialog width"

Definition at line 42 of file common.h.

◆ SETTINGS_PYTHON_PATH

#define SETTINGS_PYTHON_PATH   "Python path"

Definition at line 80 of file common.h.

◆ SETTINGS_RESULT_COLUMN_WIDTH

#define SETTINGS_RESULT_COLUMN_WIDTH   "Result column %1 width"

Definition at line 46 of file common.h.

◆ SETTINGS_SAVE_ALL_ERRORS

#define SETTINGS_SAVE_ALL_ERRORS   "Save all errors"

Definition at line 72 of file common.h.

◆ SETTINGS_SAVE_FULL_PATH

#define SETTINGS_SAVE_FULL_PATH   "Save full path"

Definition at line 73 of file common.h.

◆ SETTINGS_SHOW_DEBUG_WARNINGS

#define SETTINGS_SHOW_DEBUG_WARNINGS   "Show debug warnings"

Definition at line 71 of file common.h.

◆ SETTINGS_SHOW_ERROR_ID

#define SETTINGS_SHOW_ERROR_ID   "Show error Id"

Definition at line 87 of file common.h.

◆ SETTINGS_SHOW_ERRORS

#define SETTINGS_SHOW_ERRORS   "Show errors"

Definition at line 53 of file common.h.

◆ SETTINGS_SHOW_FULL_PATH

#define SETTINGS_SHOW_FULL_PATH   "Show full path"

Definition at line 69 of file common.h.

◆ SETTINGS_SHOW_INFORMATION

#define SETTINGS_SHOW_INFORMATION   "Show information"

Definition at line 56 of file common.h.

◆ SETTINGS_SHOW_NO_ERRORS

#define SETTINGS_SHOW_NO_ERRORS   "Show no errors message"

Definition at line 70 of file common.h.

◆ SETTINGS_SHOW_PERFORMANCE

#define SETTINGS_SHOW_PERFORMANCE   "Show performance"

Definition at line 55 of file common.h.

◆ SETTINGS_SHOW_PORTABILITY

#define SETTINGS_SHOW_PORTABILITY   "Show portability"

Definition at line 57 of file common.h.

◆ SETTINGS_SHOW_STATISTICS

#define SETTINGS_SHOW_STATISTICS   "Show statistics"

Definition at line 88 of file common.h.

◆ SETTINGS_SHOW_STYLE

#define SETTINGS_SHOW_STYLE   "Show style"

Definition at line 52 of file common.h.

◆ SETTINGS_SHOW_WARNINGS

#define SETTINGS_SHOW_WARNINGS   "Show warnings"

Definition at line 54 of file common.h.

◆ SETTINGS_STD_C

#define SETTINGS_STD_C   "Standard C"

Definition at line 61 of file common.h.

◆ SETTINGS_STD_CPP

#define SETTINGS_STD_CPP   "Standard CPP"

Definition at line 60 of file common.h.

◆ SETTINGS_TOOLBARS_FILTER_SHOW

#define SETTINGS_TOOLBARS_FILTER_SHOW   "Toolbars/ShowFilter"

Definition at line 49 of file common.h.

◆ SETTINGS_TOOLBARS_MAIN_SHOW

#define SETTINGS_TOOLBARS_MAIN_SHOW   "Toolbars/ShowStandard"

Definition at line 47 of file common.h.

◆ SETTINGS_TOOLBARS_VIEW_SHOW

#define SETTINGS_TOOLBARS_VIEW_SHOW   "Toolbars/ShowView"

Definition at line 48 of file common.h.

◆ SETTINGS_VS_INCLUDE_PATHS

#define SETTINGS_VS_INCLUDE_PATHS   "VS include paths"

Definition at line 83 of file common.h.

◆ SETTINGS_WINDOW_HEIGHT

#define SETTINGS_WINDOW_HEIGHT   "Window height"

Definition at line 38 of file common.h.

◆ SETTINGS_WINDOW_MAXIMIZED

#define SETTINGS_WINDOW_MAXIMIZED   "Window maximized"

QSetting value names.

Definition at line 36 of file common.h.

◆ SETTINGS_WINDOW_WIDTH

#define SETTINGS_WINDOW_WIDTH   "Window width"

Definition at line 37 of file common.h.

Function Documentation

◆ getDataDir()

QString getDataDir ( )

◆ getPath()

QString getPath ( const QString &  type)

Obtains the path of specified type Returns the path of specified type if not empty.

Otherwise returns last check path if valid or user's home directory.

Parameters
typeType of path to obtain
Returns
Best path for provided type

Definition at line 32 of file common.cpp.

References SETTINGS_LAST_CHECK_PATH.

Referenced by ResultsTree::askFileDir(), ApplicationDialog::browse(), MainWindow::newProjectFile(), MainWindow::openProjectFile(), MainWindow::openResults(), MainWindow::save(), and MainWindow::selectFilesToAnalyze().

◆ operator==()

bool operator== ( const QErrorPathItem i1,
const QErrorPathItem i2 
)

◆ setPath()

void setPath ( const QString &  type,
const QString &  value 
)

Stores last used path of specified type Stores provided path as last used path for specified type.

Parameters
typeType of the path to store
valuePath to store

Definition at line 46 of file common.cpp.

Referenced by ResultsTree::askFileDir(), ApplicationDialog::browse(), MainWindow::doAnalyzeFiles(), MainWindow::doAnalyzeProject(), MainWindow::loadResults(), MainWindow::loadSettings(), MainWindow::newProjectFile(), MainWindow::openProjectFile(), MainWindow::save(), and MainWindow::selectFilesToAnalyze().

◆ toFilterString()

QString toFilterString ( const QMap< QString, QString > &  filters,
bool  addAllSupported = true,
bool  addAll = true 
)

Creates a string suitable for passing as the filter argument to methods like QFileDialog::getOpenFileName.

Parameters
filtersA map of filter descriptions to the associated file name patterns.
addAllSupportedIf set to true (the default), the function will include a filter entry containing all the file name patterns found in filters. This entry will be the first in the resulting filter string.
addAllIf set to true (the default), the function will include a filter entry displaying all files. This entry will be placed after the entry for addAllSupported files.

Example usage:

QMap<QString,QString> filters;
filters[tr("Supported images")] = "*.bmp *.jpg *.png";
filters[tr("Plain text")] = "*.txt";
const QString filterString = toFilterString(filters);
// filterString contains "All supported files (*.txt *.bmp *.jpg *.png);;All files (*.*);;Plain text (*.txt);;Supported images (*.bmp *.jpg *.png)"
QString toFilterString(const QMap< QString, QString > &filters, bool addAllSupported, bool addAll)
Creates a string suitable for passing as the filter argument to methods like QFileDialog::getOpenFile...
Definition: common.cpp:52

Definition at line 52 of file common.cpp.

Referenced by ProjectFileDialog::addExcludeFile(), ProjectFileDialog::browseImportProject(), and MainWindow::selectFilesToAnalyze().