refactor: validatorError::setMessage return early
This commit is contained in:
parent
6851046c5a
commit
ccd40c2927
1 changed files with 11 additions and 7 deletions
|
|
@ -25,9 +25,14 @@ const QString &ValidationError::message() const
|
|||
|
||||
void ValidationError::setMessage(const QString &message)
|
||||
{
|
||||
if (m_message == message)
|
||||
return;
|
||||
|
||||
m_message = message;
|
||||
|
||||
if (m_label) {
|
||||
if (!m_label)
|
||||
return;
|
||||
|
||||
if (message.isEmpty()) {
|
||||
clear();
|
||||
} else {
|
||||
|
|
@ -35,7 +40,6 @@ void ValidationError::setMessage(const QString &message)
|
|||
m_label->setText(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ValidationError::clear()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue