2009-03-01 08:38:21 +01:00
|
|
|
/*
|
|
|
|
* Cppcheck - A tool for static C/C++ code analysis
|
2016-01-01 14:34:45 +01:00
|
|
|
* Copyright (C) 2007-2016 Cppcheck team.
|
2009-03-01 08:38:21 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-09-27 17:08:31 +02:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2009-03-01 08:38:21 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef RESULTSTREE_H
|
|
|
|
#define RESULTSTREE_H
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
#include <QStandardItemModel>
|
|
|
|
#include <QStandardItem>
|
|
|
|
#include <QSettings>
|
2009-05-23 13:26:04 +02:00
|
|
|
#include <QContextMenuEvent>
|
2011-03-07 21:36:47 +01:00
|
|
|
#include "errorlogger.h" // Severity
|
2011-10-11 21:14:15 +02:00
|
|
|
#include "showtypes.h"
|
2009-05-23 10:17:27 +02:00
|
|
|
|
2012-10-07 12:25:34 +02:00
|
|
|
class ApplicationList;
|
2009-06-24 09:54:56 +02:00
|
|
|
class Report;
|
2010-07-10 19:30:31 +02:00
|
|
|
class ErrorItem;
|
|
|
|
class ErrorLine;
|
2010-11-23 21:37:31 +01:00
|
|
|
class QModelIndex;
|
|
|
|
class QWidget;
|
2010-11-28 22:26:53 +01:00
|
|
|
class QItemSelectionModel;
|
2015-12-23 10:28:07 +01:00
|
|
|
class ThreadHandler;
|
2009-06-24 09:54:56 +02:00
|
|
|
|
2009-07-17 10:49:01 +02:00
|
|
|
/// @addtogroup GUI
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
|
2009-03-01 08:38:21 +01:00
|
|
|
/**
|
|
|
|
* @brief Cppcheck's results are shown in this tree
|
|
|
|
*
|
|
|
|
*/
|
2011-10-13 20:53:06 +02:00
|
|
|
class ResultsTree : public QTreeView {
|
2009-05-23 13:26:04 +02:00
|
|
|
Q_OBJECT
|
2009-03-01 08:38:21 +01:00
|
|
|
public:
|
2015-03-08 18:18:09 +01:00
|
|
|
explicit ResultsTree(QWidget * parent = 0);
|
2009-03-01 08:38:21 +01:00
|
|
|
virtual ~ResultsTree();
|
2015-12-23 10:28:07 +01:00
|
|
|
void Initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler);
|
2009-03-01 08:38:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Add a new item to the tree
|
|
|
|
*
|
2010-07-10 19:30:31 +02:00
|
|
|
* @param item Error item data
|
2009-03-01 08:38:21 +01:00
|
|
|
*/
|
2013-02-15 16:49:36 +01:00
|
|
|
bool AddErrorItem(const ErrorItem &item);
|
2009-03-01 08:38:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Clear all errors from the tree
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void Clear();
|
2009-03-22 18:39:44 +01:00
|
|
|
|
2012-02-14 21:16:11 +01:00
|
|
|
/**
|
|
|
|
* @brief Clear errors for a specific file from the tree
|
|
|
|
*/
|
|
|
|
void Clear(const QString &filename);
|
|
|
|
|
2015-12-29 01:38:36 +01:00
|
|
|
/**
|
|
|
|
* @brief Clear errors of a file selected for recheck
|
|
|
|
*/
|
|
|
|
void ClearRecheckFile(const QString &filename);
|
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
|
|
|
* @brief Function to show/hide certain type of errors
|
2009-05-23 18:29:24 +02:00
|
|
|
* Refreshes the tree.
|
2009-06-01 23:52:14 +02:00
|
|
|
*
|
|
|
|
* @param type Type of error to show/hide
|
2009-06-20 11:54:49 +02:00
|
|
|
* @param show Should specified errors be shown (true) or hidden (false)
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2011-10-11 21:14:15 +02:00
|
|
|
void ShowResults(ShowTypes::ShowType type, bool show);
|
2009-06-03 20:18:22 +02:00
|
|
|
|
2011-05-04 07:30:54 +02:00
|
|
|
/**
|
|
|
|
* @brief Function to filter the displayed list of errors.
|
|
|
|
* Refreshes the tree.
|
|
|
|
*
|
|
|
|
* @param filter String that must be found in the summary, description, file or id
|
|
|
|
*/
|
|
|
|
void FilterResults(const QString& filter);
|
|
|
|
|
2010-11-21 19:55:34 +01:00
|
|
|
/**
|
|
|
|
* @brief Function to show results that were previous hidden with HideResult()
|
|
|
|
*/
|
|
|
|
void ShowHiddenResults();
|
|
|
|
|
2009-06-03 20:18:22 +02:00
|
|
|
/**
|
|
|
|
* @brief Save results to a text stream
|
|
|
|
*
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
void SaveResults(Report *report) const;
|
2009-06-03 20:18:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Update tree settings
|
|
|
|
*
|
|
|
|
* @param showFullPath Show full path of files in the tree
|
|
|
|
* @param saveFullPath Save full path of files in reports
|
|
|
|
* @param saveAllErrors Save all visible errors
|
2012-10-27 11:16:52 +02:00
|
|
|
* @param showErrorId Show error id
|
2015-10-15 11:59:17 +02:00
|
|
|
* @param showInconclusive Show inconclusive column
|
2009-06-03 20:18:22 +02:00
|
|
|
*/
|
2015-10-15 11:59:17 +02:00
|
|
|
void UpdateSettings(bool showFullPath, bool saveFullPath, bool saveAllErrors, bool showErrorId, bool showInconclusive);
|
2009-06-03 20:18:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Set the directory we are checking
|
|
|
|
*
|
|
|
|
* This is used to split error file path to relative if necessary
|
|
|
|
* @param dir Directory we are checking
|
|
|
|
*/
|
|
|
|
void SetCheckDirectory(const QString &dir);
|
2009-06-09 09:51:27 +02:00
|
|
|
|
|
|
|
/**
|
2009-06-20 22:05:17 +02:00
|
|
|
* @brief Check if there are any visible results in view.
|
|
|
|
* @return true if there is at least one visible warning/error.
|
2009-06-09 09:51:27 +02:00
|
|
|
*/
|
2009-06-20 22:05:17 +02:00
|
|
|
bool HasVisibleResults() const;
|
2009-06-09 09:51:27 +02:00
|
|
|
|
2009-06-20 22:42:12 +02:00
|
|
|
/**
|
|
|
|
* @brief Do we have results from check?
|
|
|
|
* @return true if there is at least one warning/error, hidden or visible.
|
|
|
|
*/
|
|
|
|
bool HasResults() const;
|
|
|
|
|
2009-07-02 10:32:29 +02:00
|
|
|
/**
|
|
|
|
* @brief Save all settings
|
2012-02-15 23:00:13 +01:00
|
|
|
* Column widths
|
2009-07-02 10:32:29 +02:00
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
void SaveSettings() const;
|
2009-07-02 10:32:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Change all visible texts language
|
|
|
|
*
|
|
|
|
*/
|
2009-07-02 10:46:26 +02:00
|
|
|
void Translate();
|
2010-11-24 09:48:07 +01:00
|
|
|
|
2012-10-27 11:16:52 +02:00
|
|
|
/**
|
|
|
|
* @brief Show optional column "Id"
|
|
|
|
*/
|
|
|
|
void ShowIdColumn(bool show);
|
|
|
|
|
2015-10-15 11:59:17 +02:00
|
|
|
/**
|
|
|
|
* @brief Show optional column "Inconclusve"
|
|
|
|
*/
|
|
|
|
void ShowInconclusiveColumn(bool show);
|
|
|
|
|
2012-10-27 11:16:52 +02:00
|
|
|
/**
|
|
|
|
* @brief Returns true if column "Id" is shown
|
|
|
|
*/
|
2014-11-20 14:20:09 +01:00
|
|
|
bool ShowIdColumn() const {
|
2012-10-27 11:16:52 +02:00
|
|
|
return mShowErrorId;
|
|
|
|
}
|
|
|
|
|
2010-11-29 23:01:45 +01:00
|
|
|
/**
|
2011-10-11 21:14:15 +02:00
|
|
|
* @brief GUI severities.
|
|
|
|
*/
|
|
|
|
ShowTypes mShowSeverities;
|
|
|
|
|
2015-12-03 19:33:36 +01:00
|
|
|
virtual void keyPressEvent(QKeyEvent *event);
|
2010-11-29 23:01:45 +01:00
|
|
|
|
2010-11-24 09:48:07 +01:00
|
|
|
signals:
|
|
|
|
/**
|
|
|
|
* @brief Signal that results have been hidden or shown
|
|
|
|
*
|
|
|
|
* @param hidden true if there are some hidden results, or false if there are not
|
|
|
|
*/
|
|
|
|
void ResultsHidden(bool hidden);
|
|
|
|
|
2015-12-23 10:28:07 +01:00
|
|
|
/**
|
|
|
|
* @brief Signal to perform selected files recheck
|
|
|
|
*
|
|
|
|
* @param selectedItems list of selected files
|
|
|
|
*/
|
|
|
|
void CheckSelected(QStringList selectedItems);
|
|
|
|
|
2010-11-23 21:37:31 +01:00
|
|
|
/**
|
|
|
|
* @brief Signal for selection change in result tree.
|
|
|
|
*
|
2012-10-19 11:29:05 +02:00
|
|
|
* @param current Model index to specify new selected item.
|
2010-11-23 21:37:31 +01:00
|
|
|
*/
|
|
|
|
void SelectionChanged(const QModelIndex ¤t);
|
|
|
|
|
2009-05-23 13:26:04 +02:00
|
|
|
protected slots:
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
|
|
|
* @brief Slot to quickstart an error with default application
|
|
|
|
*
|
|
|
|
* @param index Model index to specify which error item to open
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2009-05-23 17:45:05 +02:00
|
|
|
void QuickStartApplication(const QModelIndex &index);
|
2009-05-23 18:29:24 +02:00
|
|
|
|
2009-05-23 13:26:04 +02:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to open an error with specified application
|
|
|
|
*
|
|
|
|
* @param application Index of the application to open the error
|
|
|
|
*/
|
|
|
|
void Context(int application);
|
2009-06-09 09:51:27 +02:00
|
|
|
|
2009-06-14 14:09:52 +02:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to copy filename to clipboard
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void CopyFilename();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to copy full path to clipboard
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void CopyFullPath();
|
|
|
|
|
2009-12-06 17:46:24 +01:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to the current error message to clipboard
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void CopyMessage();
|
|
|
|
|
2012-11-03 21:41:42 +01:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to the current error message Id to clipboard
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void CopyMessageId();
|
|
|
|
|
2010-11-21 19:55:34 +01:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to hide the current error message
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void HideResult();
|
|
|
|
|
2015-12-23 10:28:07 +01:00
|
|
|
/**
|
|
|
|
* @brief Slot for rechecking selected files
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void RecheckSelectedFiles();
|
|
|
|
|
2013-02-07 18:00:14 +01:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to hide all messages with the current message Id
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void HideAllIdResult();
|
|
|
|
|
2015-05-25 15:33:46 +02:00
|
|
|
/**
|
|
|
|
* @brief Slot for context menu item to open the folder containing the current file.
|
|
|
|
*/
|
|
|
|
void OpenContainingFolder();
|
|
|
|
|
2010-11-23 21:37:31 +01:00
|
|
|
/**
|
|
|
|
* @brief Slot for selection change in the results tree.
|
|
|
|
*
|
2012-10-19 11:29:05 +02:00
|
|
|
* @param current Model index to specify new selected item.
|
|
|
|
* @param previous Model index to specify previous selected item.
|
2010-11-23 21:37:31 +01:00
|
|
|
*/
|
|
|
|
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
|
|
|
|
2009-03-01 08:38:21 +01:00
|
|
|
protected:
|
2009-06-03 20:18:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Hides/shows full file path on all error file items according to mShowFullPath
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void RefreshFilePaths();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Hides/shows full file path on all error file items according to mShowFullPath
|
|
|
|
* @param item Parent item whose childrens paths to change
|
|
|
|
*/
|
|
|
|
void RefreshFilePaths(QStandardItem *item);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Removes checking directory from given path if mShowFullPath is false
|
|
|
|
*
|
|
|
|
* @param path Path to remove checking directory
|
|
|
|
* @param saving are we saving? Check mSaveFullPath instead
|
|
|
|
* @return Path that has checking directory removed
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
QString StripPath(const QString &path, bool saving) const;
|
2009-06-03 20:18:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2010-03-14 18:18:17 +01:00
|
|
|
* @brief Save all errors under specified item
|
|
|
|
* @param report Report that errors are saved to
|
2009-06-03 20:18:22 +02:00
|
|
|
* @param item Item whose errors to save
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
void SaveErrors(Report *report, QStandardItem *item) const;
|
2009-06-03 20:18:22 +02:00
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
|
|
|
* @brief Convert a severity string to a icon filename
|
|
|
|
*
|
2011-03-07 22:11:59 +01:00
|
|
|
* @param severity Severity
|
2009-05-26 17:21:39 +02:00
|
|
|
*/
|
2011-03-07 22:11:59 +01:00
|
|
|
QString SeverityToIcon(Severity::SeverityType severity) const;
|
2009-05-23 18:29:24 +02:00
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
2009-06-14 14:09:52 +02:00
|
|
|
* @brief Helper function to open an error within target with application*
|
2009-06-01 23:52:14 +02:00
|
|
|
*
|
|
|
|
* @param target Error tree item to open
|
2011-02-25 11:16:20 +01:00
|
|
|
* @param application Index of the application to open with. Giving -1
|
|
|
|
* (default value) will open the default application.
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2011-02-25 11:16:20 +01:00
|
|
|
void StartApplication(QStandardItem *target, int application = -1);
|
2009-05-23 18:29:24 +02:00
|
|
|
|
2009-06-14 14:09:52 +02:00
|
|
|
/**
|
|
|
|
* @brief Helper function to copy filename/full path to the clipboard
|
|
|
|
*
|
|
|
|
* @param target Error tree item to open
|
2009-06-20 11:54:49 +02:00
|
|
|
* @param fullPath Are we copying full path or only filename?
|
2009-06-14 14:09:52 +02:00
|
|
|
*/
|
2015-05-25 15:33:46 +02:00
|
|
|
void CopyPathToClipboard(QStandardItem *target, bool fullPath);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Helper function returning the filename/full path of the error tree item \a target.
|
|
|
|
*
|
|
|
|
* @param target The error tree item containing the filename/full path
|
|
|
|
* @param fullPath Whether or not to retrieve the full path or only the filename.
|
|
|
|
*/
|
|
|
|
QString GetFilePath(QStandardItem *target, bool fullPath);
|
2009-06-14 14:09:52 +02:00
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
|
|
|
* @brief Context menu event (user right clicked on the tree)
|
|
|
|
*
|
|
|
|
* @param e Event
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2009-05-23 13:26:04 +02:00
|
|
|
void contextMenuEvent(QContextMenuEvent * e);
|
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
|
|
|
* @brief Add a new error item beneath a file or a backtrace item beneath an error
|
|
|
|
*
|
|
|
|
* @param parent Parent for the item. Either a file item or an error item
|
2010-07-10 19:30:31 +02:00
|
|
|
* @param item Error line data
|
2009-05-26 17:21:39 +02:00
|
|
|
* @param hide Should this be hidden (true) or shown (false)
|
2009-06-20 11:54:49 +02:00
|
|
|
* @param icon Should a default backtrace item icon be added
|
2015-10-15 12:08:51 +02:00
|
|
|
* @param childOfMessage Is this a child element of a message?
|
2009-06-01 23:52:14 +02:00
|
|
|
* @return newly created QStandardItem *
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2009-05-23 10:17:27 +02:00
|
|
|
QStandardItem *AddBacktraceFiles(QStandardItem *parent,
|
2010-07-10 19:30:31 +02:00
|
|
|
const ErrorLine &item,
|
2009-05-26 17:21:39 +02:00
|
|
|
const bool hide,
|
2015-10-15 12:08:51 +02:00
|
|
|
const QString &icon,
|
|
|
|
bool childOfMessage);
|
2009-05-23 10:17:27 +02:00
|
|
|
|
2009-05-23 18:29:24 +02:00
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
2009-05-23 18:29:24 +02:00
|
|
|
* @brief Refresh tree by checking which of the items should be shown
|
2009-06-01 23:52:14 +02:00
|
|
|
* and which should be hidden
|
|
|
|
*
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2009-03-22 18:39:44 +01:00
|
|
|
void RefreshTree();
|
2009-05-23 18:29:24 +02:00
|
|
|
|
2011-03-07 22:35:58 +01:00
|
|
|
/**
|
|
|
|
* @brief Convert Severity to translated string for GUI.
|
2012-10-19 11:29:05 +02:00
|
|
|
* @param severity Severity to convert
|
2011-03-07 22:35:58 +01:00
|
|
|
* @return Severity as translated string
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
static QString SeverityToTranslatedString(Severity::SeverityType severity);
|
2011-03-07 22:35:58 +01:00
|
|
|
|
2009-03-01 08:38:21 +01:00
|
|
|
/**
|
|
|
|
* @brief Load all settings
|
2012-02-15 23:00:13 +01:00
|
|
|
* Column widths
|
2009-03-01 08:38:21 +01:00
|
|
|
*/
|
|
|
|
void LoadSettings();
|
|
|
|
|
2010-07-11 13:22:55 +02:00
|
|
|
/**
|
|
|
|
* @brief Ask directory where file is located.
|
|
|
|
* @param file File name.
|
|
|
|
* @return Directory user chose.
|
|
|
|
*/
|
|
|
|
QString AskFileDir(const QString &file);
|
2009-03-01 08:38:21 +01:00
|
|
|
|
|
|
|
/**
|
2010-11-19 21:54:40 +01:00
|
|
|
* @brief Create new normal item.
|
2009-03-01 08:38:21 +01:00
|
|
|
*
|
2010-11-19 22:11:40 +01:00
|
|
|
* Normal item has left alignment and text set also as tooltip.
|
2009-03-01 08:38:21 +01:00
|
|
|
* @param name name for the item
|
|
|
|
* @return new QStandardItem
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
static QStandardItem *CreateNormalItem(const QString &name);
|
2009-03-01 08:38:21 +01:00
|
|
|
|
2015-10-15 11:59:17 +02:00
|
|
|
/**
|
|
|
|
* @brief Create new normal item.
|
|
|
|
*
|
|
|
|
* Normal item has left alignment and text set also as tooltip.
|
|
|
|
* @param checked checked
|
|
|
|
* @return new QStandardItem
|
|
|
|
*/
|
|
|
|
static QStandardItem *CreateCheckboxItem(bool checked);
|
|
|
|
|
2010-11-19 22:11:40 +01:00
|
|
|
/**
|
|
|
|
* @brief Create new line number item.
|
|
|
|
*
|
|
|
|
* Line number item has right align and text set as tooltip.
|
2012-10-19 11:29:05 +02:00
|
|
|
* @param linenumber name for the item
|
2010-11-19 22:11:40 +01:00
|
|
|
* @return new QStandardItem
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
static QStandardItem *CreateLineNumberItem(const QString &linenumber);
|
2010-11-19 22:11:40 +01:00
|
|
|
|
2009-03-01 08:38:21 +01:00
|
|
|
/**
|
|
|
|
* @brief Finds a file item
|
|
|
|
*
|
|
|
|
* @param name name of the file item to find
|
|
|
|
* @return pointer to file item or null if none found
|
|
|
|
*/
|
2012-10-27 12:10:32 +02:00
|
|
|
QStandardItem *FindFileItem(const QString &name) const;
|
2009-03-01 08:38:21 +01:00
|
|
|
|
2009-05-23 10:17:27 +02:00
|
|
|
|
2009-05-23 13:26:04 +02:00
|
|
|
/**
|
|
|
|
* @brief Ensures there's a item in the model for the specified file
|
|
|
|
*
|
2009-06-14 14:09:52 +02:00
|
|
|
* @param fullpath Full path to the file item.
|
2012-02-14 21:16:11 +01:00
|
|
|
* @param file0 Source file
|
2009-06-09 08:30:28 +02:00
|
|
|
* @param hide is the error (we want this file item for) hidden?
|
2009-05-23 13:26:04 +02:00
|
|
|
* @return QStandardItem to be used as a parent for all errors for specified file
|
2009-05-23 10:17:27 +02:00
|
|
|
*/
|
2012-02-14 21:16:11 +01:00
|
|
|
QStandardItem *EnsureFileItem(const QString &fullpath, const QString &file0, bool hide);
|
2009-05-23 10:17:27 +02:00
|
|
|
|
2009-03-01 08:38:21 +01:00
|
|
|
/**
|
|
|
|
* @brief Item model for tree
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
QStandardItemModel mModel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Program settings
|
|
|
|
*
|
|
|
|
*/
|
2009-07-02 10:32:29 +02:00
|
|
|
QSettings *mSettings;
|
2009-03-22 18:39:44 +01:00
|
|
|
|
2011-05-04 07:30:54 +02:00
|
|
|
/**
|
|
|
|
* @brief A string used to filter the results for display.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
QString mFilter;
|
|
|
|
|
2009-06-01 23:52:14 +02:00
|
|
|
/**
|
|
|
|
* @brief List of applications to open errors with
|
|
|
|
*
|
2009-05-23 18:29:24 +02:00
|
|
|
*/
|
2009-07-02 10:32:29 +02:00
|
|
|
ApplicationList *mApplications;
|
2009-05-23 13:26:04 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Right clicked item (used by context menu slots)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
QStandardItem *mContextItem;
|
2009-06-03 20:18:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Should full path of files be shown (true) or relative (false)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
bool mShowFullPath;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Should full path of files be saved
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
bool mSaveFullPath;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Save all errors (true) or only visible (false)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
bool mSaveAllErrors;
|
|
|
|
|
2012-10-27 11:16:52 +02:00
|
|
|
/**
|
|
|
|
* @brief true if optional column "Id" is shown
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
bool mShowErrorId;
|
|
|
|
|
2009-06-03 20:18:22 +02:00
|
|
|
/**
|
|
|
|
* @brief Path we are currently checking
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
QString mCheckPath;
|
2009-06-09 09:51:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Are there any visible errors
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
bool mVisibleErrors;
|
|
|
|
|
2009-03-01 08:38:21 +01:00
|
|
|
private:
|
2010-11-28 22:26:53 +01:00
|
|
|
QItemSelectionModel *mSelectionModel;
|
2015-12-23 10:28:07 +01:00
|
|
|
ThreadHandler *mThread;
|
2009-03-01 08:38:21 +01:00
|
|
|
};
|
2009-07-17 10:49:01 +02:00
|
|
|
/// @}
|
2009-03-01 08:38:21 +01:00
|
|
|
#endif // RESULTSTREE_H
|