fixed some "Parameter can be made pointer/reference to const" Rider warnings (#5516)
This commit is contained in:
parent
903eccb336
commit
723ba16eb6
|
@ -248,7 +248,7 @@ bool ProjectFile::read(const QString &filename)
|
||||||
return projectTagFound;
|
return projectTagFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectFile::readRootPath(QXmlStreamReader &reader)
|
void ProjectFile::readRootPath(const QXmlStreamReader &reader)
|
||||||
{
|
{
|
||||||
QXmlStreamAttributes attribs = reader.attributes();
|
QXmlStreamAttributes attribs = reader.attributes();
|
||||||
QString name = attribs.value(QString(), CppcheckXml::RootPathNameAttrib).toString();
|
QString name = attribs.value(QString(), CppcheckXml::RootPathNameAttrib).toString();
|
||||||
|
|
|
@ -426,7 +426,7 @@ protected:
|
||||||
* @brief Read optional root path from XML.
|
* @brief Read optional root path from XML.
|
||||||
* @param reader XML stream reader.
|
* @param reader XML stream reader.
|
||||||
*/
|
*/
|
||||||
void readRootPath(QXmlStreamReader &reader);
|
void readRootPath(const QXmlStreamReader &reader);
|
||||||
|
|
||||||
void readBuildDir(QXmlStreamReader &reader);
|
void readBuildDir(QXmlStreamReader &reader);
|
||||||
|
|
||||||
|
|
|
@ -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 there are no applications specified, tell the user about it
|
||||||
if (mApplications->getApplicationCount() == 0) {
|
if (mApplications->getApplicationCount() == 0) {
|
||||||
|
@ -1132,7 +1132,7 @@ void ResultsTree::quickStartApplication(const QModelIndex &index)
|
||||||
startApplication(mModel.itemFromIndex(index));
|
startApplication(mModel.itemFromIndex(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ResultsTree::getFilePath(QStandardItem *target, bool fullPath)
|
QString ResultsTree::getFilePath(const QStandardItem *target, bool fullPath)
|
||||||
{
|
{
|
||||||
if (target) {
|
if (target) {
|
||||||
// Make sure we are working with the first column
|
// Make sure we are working with the first column
|
||||||
|
|
|
@ -344,7 +344,7 @@ protected:
|
||||||
* @param application Index of the application to open with. Giving -1
|
* @param application Index of the application to open with. Giving -1
|
||||||
* (default value) will open the default application.
|
* (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.
|
* @brief Helper function returning the filename/full path of the error tree item \a target.
|
||||||
|
@ -352,7 +352,7 @@ protected:
|
||||||
* @param target The error tree item containing the filename/full path
|
* @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.
|
* @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)
|
* @brief Context menu event (user right clicked on the tree)
|
||||||
|
|
|
@ -194,7 +194,7 @@ void ThreadHandler::stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadHandler::initialize(ResultsView *view)
|
void ThreadHandler::initialize(const ResultsView *view)
|
||||||
{
|
{
|
||||||
connect(&mResults, &ThreadResult::progress,
|
connect(&mResults, &ThreadResult::progress,
|
||||||
view, &ResultsView::progress);
|
view, &ResultsView::progress);
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param view View to show error results
|
* @param view View to show error results
|
||||||
*/
|
*/
|
||||||
void initialize(ResultsView *view);
|
void initialize(const ResultsView *view);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Load settings
|
* @brief Load settings
|
||||||
|
|
|
@ -196,7 +196,7 @@ QList<ErrorItem> XmlReportV2::read()
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorItem XmlReportV2::readError(QXmlStreamReader *reader)
|
ErrorItem XmlReportV2::readError(const QXmlStreamReader *reader)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Error example from the core program in xml
|
Error example from the core program in xml
|
||||||
|
|
|
@ -79,7 +79,7 @@ protected:
|
||||||
* @brief Read and parse error item from XML stream.
|
* @brief Read and parse error item from XML stream.
|
||||||
* @param reader XML stream reader to use.
|
* @param reader XML stream reader to use.
|
||||||
*/
|
*/
|
||||||
ErrorItem readError(QXmlStreamReader *reader);
|
ErrorItem readError(const QXmlStreamReader *reader);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue