|
Cppcheck
|
Main window for cppcheck-gui. More...
#include <mainwindow.h>
Public Types | |
| enum | { MaxRecentProjects = 5 } |
| Maximum number of MRU project items in File-menu. More... | |
Public Slots | |
| void | CheckFiles () |
| Slot for check files menu item. | |
| void | ReCheck () |
| Slot to recheck files. | |
| void | ClearResults () |
| Slot to clear all search results. | |
| void | OpenResults () |
| Slot to open XML report file. | |
| void | ShowStyle (bool checked) |
| Show errors with type "style". | |
| void | ShowErrors (bool checked) |
| Show errors with type "error". | |
| void | ShowWarnings (bool checked) |
| Show errors with type "warning". | |
| void | ShowPortability (bool checked) |
| Show errors with type "portability". | |
| void | ShowPerformance (bool checked) |
| Show errors with type "performance". | |
| void | ShowInformation (bool checked) |
| Show errors with type "information". | |
| void | CheckAll () |
| Slot to check all "Show errors" menu items. | |
| void | UncheckAll () |
| Slot to uncheck all "Show errors" menu items. | |
| void | CheckDirectory () |
| Slot for check directory menu item. | |
| void | ProgramSettings () |
| Slot to open program's settings dialog. | |
| void | About () |
| Slot to open program's about dialog. | |
| void | ShowLicense () |
| Slot to to show license text. | |
| void | ShowAuthors () |
| Slot to to show authors list. | |
| void | Save () |
| Slot to stop processing files. | |
| void | NewProjectFile () |
| Slot to create new project file. | |
| void | OpenProjectFile () |
| Slot to open project file and start checking contained paths. | |
| void | ShowScratchpad () |
| Slot to open project file and start checking contained paths. | |
| void | CloseProjectFile () |
| Slot to close open project file. | |
| void | EditProjectFile () |
| Slot to edit project file. | |
| void | ShowLogView () |
| Slot for showing the log view. | |
| void | ShowStatistics () |
| Slot for showing the scan and project statistics. | |
Public Member Functions | |
| MainWindow (TranslationHandler *th, QSettings *settings) | |
| virtual | ~MainWindow () |
| void | CheckCode (const QString &code, const QString &filename) |
| Checks given code. | |
Public Attributes | |
| Platforms | mPlatforms |
| List of checked platforms. | |
Protected Slots | |
| void | CheckDone () |
| Slot for checkthread's done signal. | |
| void | CheckLockDownUI () |
| Lock down UI while checking. | |
| void | ResultsAdded () |
| Slot for enabling save and clear button. | |
| void | ToggleMainToolBar () |
| Slot for showing/hiding standard toolbar. | |
| void | ToggleViewToolBar () |
| Slot for showing/hiding Categories toolbar. | |
| void | ToggleFilterToolBar () |
| Slot for showing/hiding Filter toolbar. | |
| void | AboutToShowViewMenu () |
| Slot for updating View-menu before it is shown. | |
| void | StopChecking () |
| Slot when stop checking button is pressed. | |
| void | OpenHelpContents () |
| Open help file contents. | |
| void | Log (const QString &logline) |
| Add new line to log. | |
| void | DebugError (const ErrorItem &item) |
| Handle new debug error. | |
| void | FilterResults () |
| Filters the results in the result list. | |
| void | OpenRecentProject () |
| Opens recently opened project file. | |
| void | SelectPlatform () |
| Selects the platform as checked platform. | |
Private Member Functions | |
| void | CheckProject (Project *project) |
| Check the project. | |
| void | SetLanguage (const QString &code) |
| Set current language. | |
| virtual void | closeEvent (QCloseEvent *event) |
| Event coming when application is about to close. | |
| void | ToggleAllChecked (bool checked) |
| Helper function to toggle all show error menu items. | |
| void | EnableCheckButtons (bool enable) |
| Helper function to enable/disable all check,recheck buttons. | |
| QStringList | SelectFilesToCheck (QFileDialog::FileMode mode) |
| Select files/or directory to check. | |
| void | DoCheckFiles (const QStringList &files) |
| Check all files specified in parameter files. | |
| Settings | GetCppcheckSettings () |
| Get our default cppcheck settings and read project file. | |
| void | LoadSettings () |
| Load program settings. | |
| void | SaveSettings () const |
| Save program settings. | |
| void | FormatAndSetTitle (const QString &text=QString()) |
| Format main window title. | |
| void | OpenOnlineHelp () |
| Show help contents. | |
| void | EnableProjectActions (bool enable) |
| Enable or disable project file actions. | |
| void | EnableProjectOpenActions (bool enable) |
| Enable or disable project file actions. | |
| void | AddIncludeDirs (const QStringList &includeDirs, Settings &result) |
| Add include directories. | |
| void | HandleCLIParams (const QStringList ¶ms) |
| Handle command line parameters given to GUI. | |
| void | LoadResults (const QString file) |
| Load XML file to the GUI. | |
| void | LoadResults (const QString file, const QString checkedDirectory) |
| Load XML file to the GUI. | |
| void | LoadProjectFile (const QString &filePath) |
| Load project file to the GUI. | |
| void | UpdateMRUMenuItems () |
| Update project MRU items in File-menu. | |
| void | AddProjectMRU (const QString &project) |
| Add project file (path) to the MRU list. | |
| void | RemoveProjectMRU (const QString &project) |
| Remove project file (path) from the MRU list. | |
Private Attributes | |
| QSettings * | mSettings |
| Program settings. | |
| ThreadHandler * | mThread |
| Thread to check files. | |
| ApplicationList * | mApplications |
| List of user defined applications to open errors with. | |
| TranslationHandler * | mTranslation |
| Class to handle translation changes. | |
| Ui::MainWindow | mUI |
| Class holding all UI components. | |
| QString | mCurrentDirectory |
| Current checked directory. | |
| LogView * | mLogView |
| Log view. | |
| ScratchPad * | mScratchPad |
| Scratchpad. | |
| Project * | mProject |
| Project (file). | |
| QLineEdit * | mLineEditFilter |
| Filter field in the Filter toolbar. | |
| QTimer * | mFilterTimer |
| Timer to delay filtering while typing. | |
| QActionGroup * | mPlatformActions |
| GUI actions for selecting the checked platform. | |
| QActionGroup * | mCStandardActions |
| GUI actions for selecting the coding standard. | |
| QActionGroup * | mCppStandardActions |
| bool | mExiting |
| 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. | |
| QAction * | mRecentProjectActs [MaxRecentProjects+1] |
| Project MRU menu actions. | |
Main window for cppcheck-gui.
Definition at line 48 of file mainwindow.h.
| anonymous enum |
Maximum number of MRU project items in File-menu.
Definition at line 55 of file mainwindow.h.
| MainWindow::MainWindow | ( | TranslationHandler * | th, |
| QSettings * | settings | ||
| ) |
Definition at line 49 of file mainwindow.cpp.
References About(), AboutToShowViewMenu(), CheckAll(), CheckDirectory(), CheckDone(), CheckFiles(), ClearResults(), CloseProjectFile(), EditProjectFile(), EnableCheckButtons(), EnableProjectActions(), EnableProjectOpenActions(), FilterResults(), FormatAndSetTitle(), Platforms::get(), Platforms::getCount(), HandleCLIParams(), ThreadHandler::Initialize(), LoadSettings(), Platform::mActMainWindow, mApplications, MaxRecentProjects, mCppStandardActions, mCStandardActions, mFilterTimer, mLineEditFilter, mPlatformActions, Platforms::mPlatforms, mPlatforms, mRecentProjectActs, mSettings, mThread, Platform::mTitle, Platform::mType, mUI, NewProjectFile(), OpenHelpContents(), OpenProjectFile(), OpenRecentProject(), OpenResults(), ProgramSettings(), ReCheck(), ResultsAdded(), Save(), SelectPlatform(), SETTINGS_CHECKED_PLATFORM, ShowAuthors(), ShowErrors(), ShowInformation(), ShowLicense(), ShowLogView(), ShowPerformance(), ShowPortability(), ShowScratchpad(), ShowStatistics(), ShowStyle(), ShowWarnings(), StopChecking(), ToggleFilterToolBar(), ToggleMainToolBar(), ToggleViewToolBar(), UncheckAll(), Settings::Unspecified, UpdateMRUMenuItems(), and Settings::Win32A.
| MainWindow::~MainWindow | ( | ) | [virtual] |
Definition at line 193 of file mainwindow.cpp.
References mLogView, mProject, and mScratchPad.
| void MainWindow::About | ( | ) | [slot] |
Slot to open program's about dialog.
Definition at line 811 of file mainwindow.cpp.
References CppCheck::extraVersion(), and CppCheck::version().
Referenced by MainWindow().
| void MainWindow::AboutToShowViewMenu | ( | ) | [protected, slot] |
Slot for updating View-menu before it is shown.
Definition at line 918 of file mainwindow.cpp.
References mUI.
Referenced by MainWindow().
| void MainWindow::AddIncludeDirs | ( | const QStringList & | includeDirs, |
| Settings & | result | ||
| ) | [private] |
Add include directories.
| includeDirs | List of include directories to add. |
| result | Settings class where include directories are added. |
Definition at line 498 of file mainwindow.cpp.
References Settings::_includePaths, and mCurrentDirectory.
Referenced by GetCppcheckSettings().
| void MainWindow::AddProjectMRU | ( | const QString & | project | ) | [private] |
Add project file (path) to the MRU list.
| project | Full path to the project file to add. |
Definition at line 1197 of file mainwindow.cpp.
References MaxRecentProjects, mSettings, SETTINGS_MRU_PROJECTS, and UpdateMRUMenuItems().
Referenced by LoadProjectFile(), and NewProjectFile().
| void MainWindow::CheckAll | ( | ) | [slot] |
Slot to check all "Show errors" menu items.
Definition at line 756 of file mainwindow.cpp.
References ToggleAllChecked().
Referenced by MainWindow().
| void MainWindow::CheckCode | ( | const QString & | code, |
| const QString & | filename | ||
| ) |
Checks given code.
| code | Content of the (virtual) file to be checked |
| filename | Name of the (virtual) file to be checked - determines language. |
Definition at line 364 of file mainwindow.cpp.
References CppCheck::check(), CheckDone(), CheckLockDownUI(), ClearResults(), DebugError(), GetCppcheckSettings(), Log(), mUI, ThreadResult::SetFiles(), and CppCheck::settings().
Referenced by ScratchPad::CheckButtonClicked().
| void MainWindow::CheckDirectory | ( | ) | [slot] |
Slot for check directory menu item.
Definition at line 441 of file mainwindow.cpp.
References DoCheckFiles(), LoadProjectFile(), and SelectFilesToCheck().
Referenced by MainWindow().
| void MainWindow::CheckDone | ( | ) | [protected, slot] |
Slot for checkthread's done signal.
Definition at line 570 of file mainwindow.cpp.
References EnableCheckButtons(), EnableProjectActions(), EnableProjectOpenActions(), MaxRecentProjects, mCppStandardActions, mCStandardActions, mExiting, mPlatformActions, mRecentProjectActs, mScratchPad, and mUI.
Referenced by CheckCode(), and MainWindow().
| void MainWindow::CheckFiles | ( | ) | [slot] |
Slot for check files menu item.
Definition at line 436 of file mainwindow.cpp.
References DoCheckFiles(), and SelectFilesToCheck().
Referenced by MainWindow().
| void MainWindow::CheckLockDownUI | ( | ) | [protected, slot] |
Lock down UI while checking.
Definition at line 604 of file mainwindow.cpp.
References EnableCheckButtons(), EnableProjectActions(), EnableProjectOpenActions(), MaxRecentProjects, mCppStandardActions, mCStandardActions, mPlatformActions, mRecentProjectActs, mScratchPad, and mUI.
Referenced by CheckCode(), DoCheckFiles(), and ReCheck().
| void MainWindow::CheckProject | ( | Project * | project | ) | [private] |
Check the project.
| project | Pointer to the project to check. |
Definition at line 984 of file mainwindow.cpp.
References DoCheckFiles(), Project::Filename(), ProjectFile::GetCheckPaths(), Project::GetProjectFile(), ProjectFile::GetRootPath(), Project::IsOpen(), mCurrentDirectory, mProject, and Project::Open().
Referenced by LoadProjectFile(), and NewProjectFile().
| void MainWindow::ClearResults | ( | ) | [slot] |
Slot to clear all search results.
Definition at line 661 of file mainwindow.cpp.
References mUI.
Referenced by CheckCode(), DoCheckFiles(), and MainWindow().
| void MainWindow::closeEvent | ( | QCloseEvent * | event | ) | [private, virtual] |
Event coming when application is about to close.
Definition at line 766 of file mainwindow.cpp.
References ThreadHandler::IsChecking(), mExiting, mThread, SaveSettings(), and ThreadHandler::Stop().
| void MainWindow::CloseProjectFile | ( | ) | [slot] |
Slot to close open project file.
Definition at line 1052 of file mainwindow.cpp.
References EnableProjectActions(), EnableProjectOpenActions(), FormatAndSetTitle(), and mProject.
Referenced by MainWindow().
| void MainWindow::DebugError | ( | const ErrorItem & | item | ) | [protected, slot] |
Handle new debug error.
Definition at line 1108 of file mainwindow.cpp.
References LogView::AppendLine(), mLogView, and ErrorItem::ToString().
Referenced by CheckCode().
| void MainWindow::DoCheckFiles | ( | const QStringList & | files | ) | [private] |
Check all files specified in parameter files.
| files | List of files and/or directories to check |
Definition at line 320 of file mainwindow.cpp.
References FileList::AddExcludeList(), FileList::AddPathList(), ThreadHandler::Check(), CheckLockDownUI(), ThreadHandler::ClearFiles(), ClearResults(), GetCppcheckSettings(), ProjectFile::GetExcludedPaths(), FileList::GetFileList(), ProjectFile::GetFilename(), Project::GetProjectFile(), mCurrentDirectory, mProject, mThread, mUI, ThreadHandler::SetFiles(), SetPath(), and SETTINGS_LAST_CHECK_PATH.
Referenced by CheckDirectory(), CheckFiles(), CheckProject(), and HandleCLIParams().
| void MainWindow::EditProjectFile | ( | ) | [slot] |
Slot to edit project file.
Definition at line 1061 of file mainwindow.cpp.
References Project::Edit(), and mProject.
Referenced by MainWindow().
| void MainWindow::EnableCheckButtons | ( | bool | enable | ) | [private] |
Helper function to enable/disable all check,recheck buttons.
Definition at line 715 of file mainwindow.cpp.
References ThreadHandler::HasPreviousFiles(), mThread, and mUI.
Referenced by CheckDone(), CheckLockDownUI(), and MainWindow().
| void MainWindow::EnableProjectActions | ( | bool | enable | ) | [private] |
Enable or disable project file actions.
Project editing and closing actions should be only enabled when project is open and we are not checking files.
| enable | If true then actions are enabled. |
Definition at line 1120 of file mainwindow.cpp.
References mUI.
Referenced by CheckDone(), CheckLockDownUI(), CloseProjectFile(), MainWindow(), and NewProjectFile().
| void MainWindow::EnableProjectOpenActions | ( | bool | enable | ) | [private] |
Enable or disable project file actions.
Project opening and creating actions should be disabled when checking.
| enable | If true then actions are enabled. |
Definition at line 1126 of file mainwindow.cpp.
References mUI.
Referenced by CheckDone(), CheckLockDownUI(), CloseProjectFile(), and MainWindow().
| void MainWindow::FilterResults | ( | ) | [protected, slot] |
Filters the results in the result list.
Definition at line 1115 of file mainwindow.cpp.
References mLineEditFilter, and mUI.
Referenced by MainWindow().
| void MainWindow::FormatAndSetTitle | ( | const QString & | text = QString() | ) | [private] |
Format main window title.
| text | Text added to end of the title. |
Definition at line 893 of file mainwindow.cpp.
Referenced by CloseProjectFile(), LoadProjectFile(), MainWindow(), NewProjectFile(), and SelectFilesToCheck().
| Settings MainWindow::GetCppcheckSettings | ( | ) | [private] |
Get our default cppcheck settings and read project file.
Definition at line 515 of file mainwindow.cpp.
References Settings::_errorsOnly, Settings::_force, Settings::_inlineSuppressions, Settings::_jobs, Settings::_verbose, Settings::_xml, Settings::addEnabled(), AddIncludeDirs(), Standards::c, Standards::C11, Standards::C89, Standards::C99, Standards::cpp, Standards::CPP03, Standards::CPP11, Settings::debug, Settings::debugwarnings, ProjectFile::GetDefines(), ProjectFile::GetIncludeDirs(), Project::GetProjectFile(), Settings::inconclusive, mProject, mSettings, Settings::platformType, Standards::posix, SETTINGS_CHECK_FORCE, SETTINGS_CHECK_THREADS, SETTINGS_CHECKED_PLATFORM, SETTINGS_GLOBAL_INCLUDE_PATHS, SETTINGS_INCONCLUSIVE_ERRORS, SETTINGS_INLINE_SUPPRESSIONS, SETTINGS_SHOW_DEBUG_WARNINGS, SETTINGS_STD_C11, SETTINGS_STD_C99, SETTINGS_STD_CPP11, SETTINGS_STD_POSIX, Settings::standards, and Settings::userDefines.
Referenced by CheckCode(), DoCheckFiles(), and ReCheck().
| void MainWindow::HandleCLIParams | ( | const QStringList & | params | ) | [private] |
Handle command line parameters given to GUI.
| params | List of string given to command line. |
Definition at line 200 of file mainwindow.cpp.
References DoCheckFiles(), LoadProjectFile(), and LoadResults().
Referenced by MainWindow().
| void MainWindow::LoadProjectFile | ( | const QString & | filePath | ) | [private] |
Load project file to the GUI.
| filePath | Filename (inc. path) of project file to load. |
Definition at line 970 of file mainwindow.cpp.
References AddProjectMRU(), CheckProject(), FormatAndSetTitle(), mProject, and mUI.
Referenced by CheckDirectory(), HandleCLIParams(), OpenProjectFile(), and OpenRecentProject().
| void MainWindow::LoadResults | ( | const QString | file | ) | [private] |
Load XML file to the GUI.
| file | Filename (inc. path) of XML file to load. |
Definition at line 700 of file mainwindow.cpp.
References mUI, SetPath(), and SETTINGS_LAST_RESULT_PATH.
Referenced by HandleCLIParams(), LoadResults(), and OpenResults().
| void MainWindow::LoadResults | ( | const QString | file, |
| const QString | checkedDirectory | ||
| ) | [private] |
Load XML file to the GUI.
| file | Filename (inc. path) of XML file to load. |
| checkedDirectory | Path to the directory that the results were generated for. |
Definition at line 709 of file mainwindow.cpp.
References LoadResults(), and mUI.
| void MainWindow::LoadSettings | ( | ) | [private] |
Load program settings.
Definition at line 226 of file mainwindow.cpp.
References ShowTypes::isShown(), ApplicationList::LoadSettings(), mApplications, mSettings, mUI, SETTINGS_STD_C11, SETTINGS_STD_C89, SETTINGS_STD_C99, SETTINGS_STD_CPP03, SETTINGS_STD_CPP11, SETTINGS_STD_POSIX, SETTINGS_TOOLBARS_FILTER_SHOW, SETTINGS_TOOLBARS_MAIN_SHOW, SETTINGS_TOOLBARS_VIEW_SHOW, SETTINGS_WINDOW_HEIGHT, SETTINGS_WINDOW_MAXIMIZED, SETTINGS_WINDOW_WIDTH, ShowTypes::ShowErrors, ShowTypes::ShowInformation, ShowTypes::ShowPerformance, ShowTypes::ShowPortability, ShowTypes::ShowStyle, and ShowTypes::ShowWarnings.
Referenced by MainWindow().
| void MainWindow::Log | ( | const QString & | logline | ) | [protected, slot] |
Add new line to log.
Definition at line 1101 of file mainwindow.cpp.
References LogView::AppendLine(), and mLogView.
Referenced by CheckCode().
| void MainWindow::NewProjectFile | ( | ) | [slot] |
Slot to create new project file.
Definition at line 1025 of file mainwindow.cpp.
References AddProjectMRU(), CheckProject(), Project::Create(), Project::Edit(), EnableProjectActions(), FormatAndSetTitle(), GetPath(), mProject, SetPath(), and SETTINGS_LAST_PROJECT_PATH.
Referenced by MainWindow().
| void MainWindow::OpenHelpContents | ( | ) | [protected, slot] |
Open help file contents.
Definition at line 931 of file mainwindow.cpp.
References OpenOnlineHelp().
Referenced by MainWindow().
| void MainWindow::OpenOnlineHelp | ( | ) | [private] |
Show help contents.
Definition at line 936 of file mainwindow.cpp.
References OnlineHelpURL().
Referenced by OpenHelpContents().
| void MainWindow::OpenProjectFile | ( | ) | [slot] |
Slot to open project file and start checking contained paths.
Definition at line 941 of file mainwindow.cpp.
References GetPath(), LoadProjectFile(), mSettings, SetPath(), and SETTINGS_LAST_PROJECT_PATH.
Referenced by MainWindow().
| void MainWindow::OpenRecentProject | ( | ) | [protected, slot] |
Opens recently opened project file.
Definition at line 1132 of file mainwindow.cpp.
References LoadProjectFile(), and RemoveProjectMRU().
Referenced by MainWindow().
| void MainWindow::OpenResults | ( | ) | [slot] |
Slot to open XML report file.
Definition at line 668 of file mainwindow.cpp.
References GetPath(), LoadResults(), mUI, and SETTINGS_LAST_RESULT_PATH.
Referenced by MainWindow().
| void MainWindow::ProgramSettings | ( | ) | [slot] |
Slot to open program's settings dialog.
Definition at line 624 of file mainwindow.cpp.
References mApplications, mSettings, mTranslation, mUI, SettingsDialog::SaveAllErrors(), SettingsDialog::SaveFullPath(), SettingsDialog::SaveSettingValues(), SetLanguage(), SETTINGS_LANGUAGE, SettingsDialog::ShowErrorId(), SettingsDialog::ShowFullPath(), and SettingsDialog::ShowNoErrorsMessage().
Referenced by MainWindow().
| void MainWindow::ReCheck | ( | ) | [slot] |
Slot to recheck files.
Definition at line 639 of file mainwindow.cpp.
References ThreadHandler::Check(), CheckLockDownUI(), GetCppcheckSettings(), ProjectFile::GetFilename(), Project::GetProjectFile(), ThreadHandler::GetReCheckFiles(), mProject, mThread, and mUI.
Referenced by MainWindow().
| void MainWindow::RemoveProjectMRU | ( | const QString & | project | ) | [private] |
Remove project file (path) from the MRU list.
| project | Full path of the project file to remove. |
Definition at line 1209 of file mainwindow.cpp.
References mSettings, SETTINGS_MRU_PROJECTS, and UpdateMRUMenuItems().
Referenced by OpenRecentProject().
| void MainWindow::ResultsAdded | ( | ) | [protected, slot] |
Slot for enabling save and clear button.
Definition at line 873 of file mainwindow.cpp.
Referenced by MainWindow().
| void MainWindow::Save | ( | ) | [slot] |
Slot to stop processing files.
Definition at line 831 of file mainwindow.cpp.
References Report::CSV, GetPath(), mUI, SetPath(), SETTINGS_LAST_RESULT_PATH, Report::TXT, Report::XML, and Report::XMLV2.
Referenced by MainWindow().
| void MainWindow::SaveSettings | ( | ) | const [private] |
Save program settings.
Definition at line 287 of file mainwindow.cpp.
References TranslationHandler::GetCurrentLanguage(), mApplications, mSettings, mTranslation, mUI, ApplicationList::SaveSettings(), SETTINGS_LANGUAGE, SETTINGS_SHOW_ERRORS, SETTINGS_SHOW_INFORMATION, SETTINGS_SHOW_PERFORMANCE, SETTINGS_SHOW_PORTABILITY, SETTINGS_SHOW_STYLE, SETTINGS_SHOW_WARNINGS, SETTINGS_STD_C11, SETTINGS_STD_C89, SETTINGS_STD_C99, SETTINGS_STD_CPP03, SETTINGS_STD_CPP11, SETTINGS_STD_POSIX, SETTINGS_TOOLBARS_FILTER_SHOW, SETTINGS_TOOLBARS_MAIN_SHOW, SETTINGS_TOOLBARS_VIEW_SHOW, SETTINGS_WINDOW_HEIGHT, SETTINGS_WINDOW_MAXIMIZED, and SETTINGS_WINDOW_WIDTH.
Referenced by closeEvent().
| QStringList MainWindow::SelectFilesToCheck | ( | QFileDialog::FileMode | mode | ) | [private] |
Select files/or directory to check.
Helper function to open a dialog to ask user to select files or directory to check. Use native dialogs instead of Qt:s own dialogs.
| mode | Dialog open mode (files or directories) |
Definition at line 390 of file mainwindow.cpp.
References FormatAndSetTitle(), GetPath(), mCurrentDirectory, mProject, SetPath(), and SETTINGS_LAST_CHECK_PATH.
Referenced by CheckDirectory(), and CheckFiles().
| void MainWindow::SelectPlatform | ( | ) | [protected, slot] |
Selects the platform as checked platform.
Definition at line 1218 of file mainwindow.cpp.
References mSettings, and SETTINGS_CHECKED_PLATFORM.
Referenced by MainWindow().
| void MainWindow::SetLanguage | ( | const QString & | code | ) | [private] |
Set current language.
| code | Language code of the language to set (e.g. "en"). |
Definition at line 903 of file mainwindow.cpp.
References TranslationHandler::GetCurrentLanguage(), mLogView, mTranslation, mUI, and TranslationHandler::SetLanguage().
Referenced by ProgramSettings().
| void MainWindow::ShowAuthors | ( | ) | [slot] |
Slot to to show authors list.
Definition at line 824 of file mainwindow.cpp.
Referenced by MainWindow().
| void MainWindow::ShowErrors | ( | bool | checked | ) | [slot] |
Show errors with type "error".
| checked | Should errors be shown (true) or hidden (false) |
Definition at line 731 of file mainwindow.cpp.
References mUI, and ShowTypes::ShowErrors.
Referenced by MainWindow(), and ToggleAllChecked().
| void MainWindow::ShowInformation | ( | bool | checked | ) | [slot] |
Show errors with type "information".
| checked | Should errors be shown (true) or hidden (false) |
Definition at line 751 of file mainwindow.cpp.
References mUI, and ShowTypes::ShowInformation.
Referenced by MainWindow(), and ToggleAllChecked().
| void MainWindow::ShowLicense | ( | ) | [slot] |
Slot to to show license text.
Definition at line 817 of file mainwindow.cpp.
Referenced by MainWindow().
| void MainWindow::ShowLogView | ( | ) | [slot] |
Slot for showing the log view.
Definition at line 1075 of file mainwindow.cpp.
References mLogView.
Referenced by MainWindow().
| void MainWindow::ShowPerformance | ( | bool | checked | ) | [slot] |
Show errors with type "performance".
| checked | Should errors be shown (true) or hidden (false) |
Definition at line 746 of file mainwindow.cpp.
References mUI, and ShowTypes::ShowPerformance.
Referenced by MainWindow(), and ToggleAllChecked().
| void MainWindow::ShowPortability | ( | bool | checked | ) | [slot] |
Show errors with type "portability".
| checked | Should errors be shown (true) or hidden (false) |
Definition at line 741 of file mainwindow.cpp.
References mUI, and ShowTypes::ShowPortability.
Referenced by MainWindow(), and ToggleAllChecked().
| void MainWindow::ShowScratchpad | ( | ) | [slot] |
Slot to open project file and start checking contained paths.
Definition at line 959 of file mainwindow.cpp.
References mScratchPad.
Referenced by MainWindow().
| void MainWindow::ShowStatistics | ( | ) | [slot] |
Slot for showing the scan and project statistics.
Definition at line 1085 of file mainwindow.cpp.
References ThreadHandler::GetPreviousFilesCount(), ThreadHandler::GetPreviousScanDuration(), mCurrentDirectory, mProject, mThread, mUI, StatsDialog::setNumberOfFilesScanned(), StatsDialog::setPathSelected(), StatsDialog::setProject(), StatsDialog::setScanDuration(), and StatsDialog::setStatistics().
Referenced by MainWindow().
| void MainWindow::ShowStyle | ( | bool | checked | ) | [slot] |
Show errors with type "style".
| checked | Should errors be shown (true) or hidden (false) |
Definition at line 726 of file mainwindow.cpp.
References mUI, and ShowTypes::ShowStyle.
Referenced by MainWindow(), and ToggleAllChecked().
| void MainWindow::ShowWarnings | ( | bool | checked | ) | [slot] |
Show errors with type "warning".
| checked | Should errors be shown (true) or hidden (false) |
Definition at line 736 of file mainwindow.cpp.
References mUI, and ShowTypes::ShowWarnings.
Referenced by MainWindow(), and ToggleAllChecked().
| void MainWindow::StopChecking | ( | ) | [protected, slot] |
Slot when stop checking button is pressed.
Definition at line 925 of file mainwindow.cpp.
References mThread, mUI, and ThreadHandler::Stop().
Referenced by MainWindow().
| void MainWindow::ToggleAllChecked | ( | bool | checked | ) | [private] |
Helper function to toggle all show error menu items.
| checked | Should all errors be shown (true) or hidden (false) |
Definition at line 795 of file mainwindow.cpp.
References mUI, ShowErrors(), ShowInformation(), ShowPerformance(), ShowPortability(), ShowStyle(), and ShowWarnings().
Referenced by CheckAll(), and UncheckAll().
| void MainWindow::ToggleFilterToolBar | ( | ) | [protected, slot] |
Slot for showing/hiding Filter toolbar.
Definition at line 887 of file mainwindow.cpp.
References mLineEditFilter, and mUI.
Referenced by MainWindow().
| void MainWindow::ToggleMainToolBar | ( | ) | [protected, slot] |
Slot for showing/hiding standard toolbar.
Definition at line 877 of file mainwindow.cpp.
References mUI.
Referenced by MainWindow().
| void MainWindow::ToggleViewToolBar | ( | ) | [protected, slot] |
Slot for showing/hiding Categories toolbar.
Definition at line 882 of file mainwindow.cpp.
References mUI.
Referenced by MainWindow().
| void MainWindow::UncheckAll | ( | ) | [slot] |
Slot to uncheck all "Show errors" menu items.
Definition at line 761 of file mainwindow.cpp.
References ToggleAllChecked().
Referenced by MainWindow().
| void MainWindow::UpdateMRUMenuItems | ( | ) | [private] |
Update project MRU items in File-menu.
Definition at line 1161 of file mainwindow.cpp.
References MaxRecentProjects, mRecentProjectActs, mSettings, mUI, and SETTINGS_MRU_PROJECTS.
Referenced by AddProjectMRU(), MainWindow(), and RemoveProjectMRU().
ApplicationList* MainWindow::mApplications [private] |
List of user defined applications to open errors with.
Definition at line 460 of file mainwindow.h.
Referenced by LoadSettings(), MainWindow(), ProgramSettings(), and SaveSettings().
QActionGroup * MainWindow::mCppStandardActions [private] |
Definition at line 512 of file mainwindow.h.
Referenced by CheckDone(), CheckLockDownUI(), and MainWindow().
QActionGroup* MainWindow::mCStandardActions [private] |
GUI actions for selecting the coding standard.
Definition at line 512 of file mainwindow.h.
Referenced by CheckDone(), CheckLockDownUI(), and MainWindow().
QString MainWindow::mCurrentDirectory [private] |
Current checked directory.
Definition at line 477 of file mainwindow.h.
Referenced by AddIncludeDirs(), CheckProject(), DoCheckFiles(), SelectFilesToCheck(), and ShowStatistics().
bool MainWindow::mExiting [private] |
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.
Definition at line 519 of file mainwindow.h.
Referenced by CheckDone(), and closeEvent().
QTimer* MainWindow::mFilterTimer [private] |
Timer to delay filtering while typing.
Definition at line 502 of file mainwindow.h.
Referenced by MainWindow().
QLineEdit* MainWindow::mLineEditFilter [private] |
Filter field in the Filter toolbar.
Definition at line 497 of file mainwindow.h.
Referenced by FilterResults(), MainWindow(), and ToggleFilterToolBar().
LogView* MainWindow::mLogView [private] |
Log view.
Definition at line 482 of file mainwindow.h.
Referenced by DebugError(), Log(), SetLanguage(), ShowLogView(), and ~MainWindow().
QActionGroup* MainWindow::mPlatformActions [private] |
GUI actions for selecting the checked platform.
Definition at line 507 of file mainwindow.h.
Referenced by CheckDone(), CheckLockDownUI(), and MainWindow().
Project* MainWindow::mProject [private] |
Project (file).
Definition at line 492 of file mainwindow.h.
Referenced by CheckProject(), CloseProjectFile(), DoCheckFiles(), EditProjectFile(), GetCppcheckSettings(), LoadProjectFile(), NewProjectFile(), ReCheck(), SelectFilesToCheck(), ShowStatistics(), and ~MainWindow().
QAction* MainWindow::mRecentProjectActs[MaxRecentProjects+1] [private] |
Project MRU menu actions.
List of MRU menu actions. Needs also to store the separator.
Definition at line 525 of file mainwindow.h.
Referenced by CheckDone(), CheckLockDownUI(), MainWindow(), and UpdateMRUMenuItems().
ScratchPad* MainWindow::mScratchPad [private] |
Scratchpad.
Definition at line 487 of file mainwindow.h.
Referenced by CheckDone(), CheckLockDownUI(), ShowScratchpad(), and ~MainWindow().
QSettings* MainWindow::mSettings [private] |
Program settings.
Definition at line 448 of file mainwindow.h.
Referenced by AddProjectMRU(), GetCppcheckSettings(), LoadSettings(), MainWindow(), OpenProjectFile(), ProgramSettings(), RemoveProjectMRU(), SaveSettings(), SelectPlatform(), and UpdateMRUMenuItems().
ThreadHandler* MainWindow::mThread [private] |
Thread to check files.
Definition at line 454 of file mainwindow.h.
Referenced by closeEvent(), DoCheckFiles(), EnableCheckButtons(), MainWindow(), ReCheck(), ShowStatistics(), and StopChecking().
TranslationHandler* MainWindow::mTranslation [private] |
Class to handle translation changes.
Definition at line 466 of file mainwindow.h.
Referenced by ProgramSettings(), SaveSettings(), and SetLanguage().
Ui::MainWindow MainWindow::mUI [private] |
Class holding all UI components.
Definition at line 472 of file mainwindow.h.
Referenced by AboutToShowViewMenu(), CheckCode(), CheckDone(), CheckLockDownUI(), ClearResults(), DoCheckFiles(), EnableCheckButtons(), EnableProjectActions(), EnableProjectOpenActions(), FilterResults(), LoadProjectFile(), LoadResults(), LoadSettings(), MainWindow(), OpenResults(), ProgramSettings(), ReCheck(), Save(), SaveSettings(), SetLanguage(), ShowErrors(), ShowInformation(), ShowPerformance(), ShowPortability(), ShowStatistics(), ShowStyle(), ShowWarnings(), StopChecking(), ToggleAllChecked(), ToggleFilterToolBar(), ToggleMainToolBar(), ToggleViewToolBar(), and UpdateMRUMenuItems().
1.7.6.1