25 #include <QFileDialog>
26 #include <QMainWindow>
30 #include <QStringList>
44 class QNetworkAccessManager;
83 void analyzeCode(
const QString& code,
const QString& filename);
375 void loadResults(
const QString &selectedFile,
const QString &sourceDirectory);
405 QString
loadAddon(
Settings &settings,
const QString &filesDir,
const QString &pythonCmd,
const QString& addon);
List of applications user has specified to open errors with.
Importing project settings.
Library definitions handling.
Main window for cppcheck-gui.
void filterResults()
Filters the results in the result list.
void newProjectFile()
Slot to create new project file.
void enableProjectActions(bool enable)
Enable or disable project file actions.
void reAnalyzeAll()
Slot to reanalyze all files.
void closeEvent(QCloseEvent *event) override
Event coming when application is about to close.
bool loadLastResults()
Load last project results to the GUI.
QNetworkAccessManager * mNetworkAccessManager
ThreadHandler * mThread
Thread to analyze files.
void loadResults(const QString &selectedFile)
Load XML file to the GUI.
QStringList selectFilesToAnalyze(QFileDialog::FileMode mode)
Select files/or directory to analyze.
void showStatistics()
Slot for showing the scan and project statistics.
void showErrors(bool checked)
Show errors with type "error".
void setLanguage(const QString &code)
Set current language.
bool mExiting
Are we exiting the cppcheck? If this is true then the cppcheck is waiting for check threads to exit s...
void uncheckAll()
Slot to uncheck all "Show errors" menu items.
void handleCLIParams(const QStringList ¶ms)
Handle command line parameters given to GUI.
void showScratchpad()
Slot to show scratchpad.
void toggleMainToolBar()
Slot for showing/hiding standard toolbar.
void closeProjectFile()
Slot to close open project file.
void loadProjectFile(const QString &filePath)
Load project file to the GUI.
void enableProjectOpenActions(bool enable)
Enable or disable project file actions.
void analyzeCode(const QString &code, const QString &filename)
Analyze given code.
void save()
Slot to save results.
void checkAll()
Slot to check all "Show errors" menu items.
void clearResults()
Slot to clear all search results.
void doAnalyzeFiles(const QStringList &files, const bool checkLibrary=false, const bool checkConfiguration=false)
Analyze all files specified in parameter files.
void enableCheckButtons(bool enable)
Helper function to enable/disable all check,recheck buttons.
QAction * mRecentProjectActs[MaxRecentProjects+1]
Project MRU menu actions.
void replyFinished(QNetworkReply *reply)
void openHelpContents()
Open help file contents.
QString mCppcheckCfgProductName
void addProjectMRU(const QString &project)
Add project file (path) to the MRU list.
bool tryLoadLibrary(Library &library, const QString &filename)
Tries to load library file, prints message on error.
void checkLibrary()
Slot to reanalyze with checking library configuration.
void showLicense()
Slot to to show license text.
void toggleViewToolBar()
Slot for showing/hiding Categories toolbar.
bool mIsLogfileLoaded
Set to true in case of loading log file.
void reAnalyzeSelected(const QStringList &files)
Reanalyze selected files.
void analysisDone()
Slot for checkthread's done signal.
void analyzeDirectory()
Slot for analyze directory menu item.
Library::Error loadLibrary(Library &library, const QString &filename)
Load library file.
void updateMRUMenuItems()
Update project MRU items in File-menu.
ScratchPad * mScratchPad
Scratchpad.
void showInformation(bool checked)
Show errors with type "information".
QActionGroup * mCppStandardActions
QTimer * mFilterTimer
Timer to delay filtering while typing.
void removeProjectMRU(const QString &project)
Remove project file (path) from the MRU list.
QActionGroup * mCStandardActions
GUI actions for selecting the coding standard.
void programSettings()
Slot to open program's settings dialog.
void about()
Slot to open program's about dialog.
void showStyle(bool checked)
Show errors with type "style".
void analyzeFiles()
Slot for analyze files menu item.
void openRecentProject()
Opens recently opened project file.
void showLibraryEditor()
Slot for showing the library editor.
void addIncludeDirs(const QStringList &includeDirs, Settings &result)
Add include directories.
QLineEdit * mLineEditFilter
Filter field in the Filter toolbar.
Platforms mPlatforms
List of checked platforms.
QString loadAddon(Settings &settings, const QString &filesDir, const QString &pythonCmd, const QString &addon)
ApplicationList * mApplications
List of user defined applications to open errors with.
void saveSettings() const
Save program settings.
void openResults()
Slot to open XML report file.
void loadSettings()
Load program settings.
void openProjectFile()
Slot to open project file and start analyzing contained paths.
void enableResultsButtons()
Helper function to enable/disable results buttons (clear,save,print)
QActionGroup * mSelectLanguageActions
GUI actions for selecting language.
MainWindow & operator=(const MainWindow &)=delete
static void openOnlineHelp()
Show help contents.
Ui::MainWindow * mUI
Class holding all UI components.
void aboutToShowViewMenu()
Slot for updating View-menu before it is shown.
void analyzeProject(const ProjectFile *projectFile, const bool checkLibrary=false, const bool checkConfiguration=false)
Analyze the project.
bool isCppcheckPremium() const
ProjectFile * mProjectFile
Project (file).
void showPerformance(bool checked)
Show errors with type "performance".
TranslationHandler * mTranslation
Class to handle translation changes.
void resultsAdded()
Slot for enabling save and clear button.
QString mCurrentDirectory
Current analyzed directory.
QActionGroup * mPlatformActions
GUI actions for selecting the analyzed platform.
QSettings * mSettings
Program settings.
QPair< bool, Settings > getCppcheckSettings()
Get our default cppcheck settings and read project file.
void doAnalyzeProject(ImportProject p, const bool checkLibrary=false, const bool checkConfiguration=false)
Analyze project.
void toggleFilterToolBar()
Slot for showing/hiding Filter toolbar.
void toggleAllChecked(bool checked)
Helper function to toggle all show error menu items.
void stopAnalysis()
Slot when stop analysis button is pressed.
MainWindow(TranslationHandler *th, QSettings *settings)
void showPortability(bool checked)
Show errors with type "portability".
QString mCppcheckCfgAbout
QString getLastResults() const
Get filename for last results.
void complianceReport()
Slot to generate compliance report.
void showWarnings(bool checked)
Show errors with type "warning".
MainWindow(const MainWindow &)=delete
void reAnalyzeModified()
Slot to reanalyze modified files.
void checkConfiguration()
Slot to check configuration.
void formatAndSetTitle(const QString &text=QString())
Format main window title.
void suppressIds(QStringList ids)
Suppress error ids.
void showAuthors()
Slot to to show authors list.
void editProjectFile()
Slot to edit project file.
void selectPlatform()
Selects the platform as analyzed platform.
void reAnalyze(bool all)
Reanalyzes files.
void checkLockDownUI()
Lock down UI while analyzing.
void performSelectedFilesCheck(const QStringList &selectedFilesList)
Slot to reanalyze selected files.
A class that reads and writes project files.
A window with a text field that .
This is just a container for general settings so that we don't need to pass individual values to func...
This class handles creating threadresult and starting threads.
A class handling the available translations.