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;
|
return (ShowTypes)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowTypes ResultsTree::SeverityToShowType(const QString & severity)
|
ShowTypes ResultsTree::SeverityToShowType(const QString & severity) const
|
||||||
{
|
{
|
||||||
if (severity == "error")
|
if (severity == "error")
|
||||||
return SHOW_ERRORS;
|
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")
|
if (severity == "possible error")
|
||||||
return ":images/dialog-warning.png";
|
return ":images/dialog-warning.png";
|
||||||
|
|
|
@ -187,7 +187,7 @@ protected:
|
||||||
*
|
*
|
||||||
* @param severity Severity string
|
* @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*
|
* @brief Helper function to open an error within target with application*
|
||||||
|
@ -247,7 +247,7 @@ protected:
|
||||||
* @param severity Error severity string
|
* @param severity Error severity string
|
||||||
* @return Severity converted to ShowTypes value
|
* @return Severity converted to ShowTypes value
|
||||||
*/
|
*/
|
||||||
ShowTypes SeverityToShowType(const QString &severity);
|
ShowTypes SeverityToShowType(const QString &severity) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert ShowType to severity string
|
* @brief Convert ShowType to severity string
|
||||||
|
|
|
@ -77,7 +77,7 @@ SettingsDialog::~SettingsDialog()
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::CheckState SettingsDialog::BoolToCheckState(bool yes)
|
Qt::CheckState SettingsDialog::BoolToCheckState(bool yes) const
|
||||||
{
|
{
|
||||||
if (yes)
|
if (yes)
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ Qt::CheckState SettingsDialog::BoolToCheckState(bool yes)
|
||||||
return Qt::Unchecked;
|
return Qt::Unchecked;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SettingsDialog::CheckStateToBool(Qt::CheckState state)
|
bool SettingsDialog::CheckStateToBool(Qt::CheckState state) const
|
||||||
{
|
{
|
||||||
if (state == Qt::Checked)
|
if (state == Qt::Checked)
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ protected:
|
||||||
* @param yes value to convert
|
* @param yes value to convert
|
||||||
* @return value converted to Qt::CheckState
|
* @return value converted to Qt::CheckState
|
||||||
*/
|
*/
|
||||||
Qt::CheckState BoolToCheckState(bool yes);
|
Qt::CheckState BoolToCheckState(bool yes) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Converts Qt::CheckState to bool
|
* @brief Converts Qt::CheckState to bool
|
||||||
|
@ -154,7 +154,7 @@ protected:
|
||||||
* @param state Qt::CheckState to convert
|
* @param state Qt::CheckState to convert
|
||||||
* @return converted value
|
* @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;
|
return mNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList TranslationHandler::GetFiles()
|
const QStringList TranslationHandler::GetFiles() const
|
||||||
{
|
{
|
||||||
return mFiles;
|
return mFiles;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,8 @@ class TranslationHandler : QObject
|
||||||
public:
|
public:
|
||||||
TranslationHandler(QObject *parent);
|
TranslationHandler(QObject *parent);
|
||||||
virtual ~TranslationHandler();
|
virtual ~TranslationHandler();
|
||||||
const QStringList GetNames();
|
const QStringList GetNames() const;
|
||||||
const QStringList GetFiles();
|
const QStringList GetFiles() const;
|
||||||
bool SetLanguage(const int index, QString &error);
|
bool SetLanguage(const int index, QString &error);
|
||||||
int GetCurrentLanguage() const;
|
int GetCurrentLanguage() const;
|
||||||
int SuggestLanguage() const;
|
int SuggestLanguage() const;
|
||||||
|
|
|
@ -1831,7 +1831,7 @@ class ExecutionPathBufferOverrun : public ExecutionPath
|
||||||
public:
|
public:
|
||||||
/** Startup constructor */
|
/** Startup constructor */
|
||||||
ExecutionPathBufferOverrun(Check *c, const std::map<unsigned int, CheckBufferOverrun::ArrayInfo> &arrayinfo)
|
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