NOISSUE simplify ProblemProvider
This commit is contained in:
@ -7,23 +7,8 @@ enum class ProblemSeverity
|
||||
Error
|
||||
};
|
||||
|
||||
class PatchProblem
|
||||
struct PatchProblem
|
||||
{
|
||||
public:
|
||||
PatchProblem(ProblemSeverity severity, const QString & description)
|
||||
{
|
||||
m_severity = severity;
|
||||
m_description = description;
|
||||
}
|
||||
const QString & getDescription() const
|
||||
{
|
||||
return m_description;
|
||||
}
|
||||
const ProblemSeverity getSeverity() const
|
||||
{
|
||||
return m_severity;
|
||||
}
|
||||
private:
|
||||
ProblemSeverity m_severity;
|
||||
QString m_description;
|
||||
};
|
||||
@ -52,7 +37,7 @@ public:
|
||||
{
|
||||
m_problemSeverity = severity;
|
||||
}
|
||||
m_problems.append(PatchProblem(severity, description));
|
||||
m_problems.append({severity, description});
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -184,5 +184,5 @@ const QList<PatchProblem> ProfilePatch::getProblems()
|
||||
{
|
||||
return file->getProblems();
|
||||
}
|
||||
return {PatchProblem(ProblemSeverity::Error, QObject::tr("Patch is not loaded yet."))};
|
||||
return {{ProblemSeverity::Error, QObject::tr("Patch is not loaded yet.")}};
|
||||
}
|
||||
|
Reference in New Issue
Block a user