Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gui/projectfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ bool ProjectFile::read(const QString &filename)
return projectTagFound;
}

void ProjectFile::readRootPath(QXmlStreamReader &reader)
void ProjectFile::readRootPath(const QXmlStreamReader &reader)
{
QXmlStreamAttributes attribs = reader.attributes();
QString name = attribs.value(QString(), CppcheckXml::RootPathNameAttrib).toString();
Expand Down
2 changes: 1 addition & 1 deletion gui/projectfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ class ProjectFile : public QObject {
* @brief Read optional root path from XML.
* @param reader XML stream reader.
*/
void readRootPath(QXmlStreamReader &reader);
void readRootPath(const QXmlStreamReader &reader);

void readBuildDir(QXmlStreamReader &reader);

Expand Down
4 changes: 2 additions & 2 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
}
}

void ResultsTree::startApplication(QStandardItem *target, int application)
void ResultsTree::startApplication(const QStandardItem *target, int application)
{
//If there are no applications specified, tell the user about it
if (mApplications->getApplicationCount() == 0) {
Expand Down Expand Up @@ -1132,7 +1132,7 @@ void ResultsTree::quickStartApplication(const QModelIndex &index)
startApplication(mModel.itemFromIndex(index));
}

QString ResultsTree::getFilePath(QStandardItem *target, bool fullPath)
QString ResultsTree::getFilePath(const QStandardItem *target, bool fullPath)
{
if (target) {
// Make sure we are working with the first column
Expand Down
4 changes: 2 additions & 2 deletions gui/resultstree.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ protected slots:
* @param application Index of the application to open with. Giving -1
* (default value) will open the default application.
*/
void startApplication(QStandardItem *target, int application = -1);
void startApplication(const QStandardItem *target, int application = -1);

/**
* @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.
*/
static QString getFilePath(QStandardItem *target, bool fullPath);
static QString getFilePath(const QStandardItem *target, bool fullPath);

/**
* @brief Context menu event (user right clicked on the tree)
Expand Down
2 changes: 1 addition & 1 deletion gui/threadhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void ThreadHandler::stop()
}
}

void ThreadHandler::initialize(ResultsView *view)
void ThreadHandler::initialize(const ResultsView *view)
{
connect(&mResults, &ThreadResult::progress,
view, &ResultsView::progress);
Expand Down
2 changes: 1 addition & 1 deletion gui/threadhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ThreadHandler : public QObject {
*
* @param view View to show error results
*/
void initialize(ResultsView *view);
void initialize(const ResultsView *view);

/**
* @brief Load settings
Expand Down
2 changes: 1 addition & 1 deletion gui/xmlreportv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ QList<ErrorItem> XmlReportV2::read()
return errors;
}

ErrorItem XmlReportV2::readError(QXmlStreamReader *reader)
ErrorItem XmlReportV2::readError(const QXmlStreamReader *reader)
{
/*
Error example from the core program in xml
Expand Down
2 changes: 1 addition & 1 deletion gui/xmlreportv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class XmlReportV2 : public XmlReport {
* @brief Read and parse error item from XML stream.
* @param reader XML stream reader to use.
*/
ErrorItem readError(QXmlStreamReader *reader);
ErrorItem readError(const QXmlStreamReader *reader);

private:
/**
Expand Down