Fixed #1925 (fix some cppcheck warnings in cppcheck)
This commit is contained in:
parent
0b41d822cb
commit
483a3ddfe1
|
@ -210,7 +210,7 @@ ShowTypes ResultsTree::VariantToShowType(const QVariant &data)
|
|||
return (ShowTypes)value;
|
||||
}
|
||||
|
||||
ShowTypes ResultsTree::SeverityToShowType(const QString & severity)
|
||||
ShowTypes ResultsTree::SeverityToShowType(const QString & severity) const
|
||||
{
|
||||
if (severity == "error")
|
||||
return SHOW_ERRORS;
|
||||
|
@ -610,7 +610,7 @@ void ResultsTree::CopyPath(QStandardItem *target, bool fullPath)
|
|||
}
|
||||
}
|
||||
|
||||
QString ResultsTree::SeverityToIcon(const QString &severity)
|
||||
QString ResultsTree::SeverityToIcon(const QString &severity) const
|
||||
{
|
||||
if (severity == "possible error")
|
||||
return ":images/dialog-warning.png";
|
||||
|
|
|
@ -187,7 +187,7 @@ protected:
|
|||
*
|
||||
* @param severity Severity string
|
||||
*/
|
||||
QString SeverityToIcon(const QString &severity);
|
||||
QString SeverityToIcon(const QString &severity) const;
|
||||
|
||||
/**
|
||||
* @brief Helper function to open an error within target with application*
|
||||
|
@ -247,7 +247,7 @@ protected:
|
|||
* @param severity Error severity string
|
||||
* @return Severity converted to ShowTypes value
|
||||
*/
|
||||
ShowTypes SeverityToShowType(const QString &severity);
|
||||
ShowTypes SeverityToShowType(const QString &severity) const;
|
||||
|
||||
/**
|
||||
* @brief Convert ShowType to severity string
|
||||
|
|
|
@ -77,7 +77,7 @@ SettingsDialog::~SettingsDialog()
|
|||
SaveSettings();
|
||||
}
|
||||
|
||||
Qt::CheckState SettingsDialog::BoolToCheckState(bool yes)
|
||||
Qt::CheckState SettingsDialog::BoolToCheckState(bool yes) const
|
||||
{
|
||||
if (yes)
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ Qt::CheckState SettingsDialog::BoolToCheckState(bool yes)
|
|||
return Qt::Unchecked;
|
||||
}
|
||||
|
||||
bool SettingsDialog::CheckStateToBool(Qt::CheckState state)
|
||||
bool SettingsDialog::CheckStateToBool(Qt::CheckState state) const
|
||||
{
|
||||
if (state == Qt::Checked)
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ protected:
|
|||
* @param yes value to convert
|
||||
* @return value converted to Qt::CheckState
|
||||
*/
|
||||
Qt::CheckState BoolToCheckState(bool yes);
|
||||
Qt::CheckState BoolToCheckState(bool yes) const;
|
||||
|
||||
/**
|
||||
* @brief Converts Qt::CheckState to bool
|
||||
|
@ -154,7 +154,7 @@ protected:
|
|||
* @param state Qt::CheckState to convert
|
||||
* @return converted value
|
||||
*/
|
||||
bool CheckStateToBool(Qt::CheckState state);
|
||||
bool CheckStateToBool(Qt::CheckState state) const;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,12 +62,12 @@ TranslationHandler::~TranslationHandler()
|
|||
{
|
||||
}
|
||||
|
||||
const QStringList TranslationHandler::GetNames()
|
||||
const QStringList TranslationHandler::GetNames() const
|
||||
{
|
||||
return mNames;
|
||||
}
|
||||
|
||||
const QStringList TranslationHandler::GetFiles()
|
||||
const QStringList TranslationHandler::GetFiles() const
|
||||
{
|
||||
return mFiles;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ class TranslationHandler : QObject
|
|||
public:
|
||||
TranslationHandler(QObject *parent);
|
||||
virtual ~TranslationHandler();
|
||||
const QStringList GetNames();
|
||||
const QStringList GetFiles();
|
||||
const QStringList GetNames() const;
|
||||
const QStringList GetFiles() const;
|
||||
bool SetLanguage(const int index, QString &error);
|
||||
int GetCurrentLanguage() const;
|
||||
int SuggestLanguage() const;
|
||||
|
|
|
@ -1831,7 +1831,7 @@ class ExecutionPathBufferOverrun : public ExecutionPath
|
|||
public:
|
||||
/** Startup constructor */
|
||||
ExecutionPathBufferOverrun(Check *c, const std::map<unsigned int, CheckBufferOverrun::ArrayInfo> &arrayinfo)
|
||||
: ExecutionPath(c, 0), arrayInfo(arrayinfo)
|
||||
: ExecutionPath(c, 0), arrayInfo(arrayinfo), value(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue