refactor: validatorError::setMessage return early

This commit is contained in:
sithlord48
2025-12-24 10:36:03 -05:00
committed by Nick Bolton
parent 6851046c5a
commit ccd40c2927

View File

@ -25,15 +25,19 @@ const QString &ValidationError::message() const
void ValidationError::setMessage(const QString &message)
{
if (m_message == message)
return;
m_message = message;
if (m_label) {
if (message.isEmpty()) {
clear();
} else {
m_label->setStyleSheet(kStyleErrorActiveLabel);
m_label->setText(message);
}
if (!m_label)
return;
if (message.isEmpty()) {
clear();
} else {
m_label->setStyleSheet(kStyleErrorActiveLabel);
m_label->setText(message);
}
}