refactor: ValidatorError, m_pLabel -> m_label

This commit is contained in:
sithlord48 2025-12-24 10:20:16 -05:00 committed by Nick Bolton
parent b56dd3f387
commit 1a9316150d
2 changed files with 8 additions and 8 deletions

View file

@ -20,11 +20,11 @@ void clear(QLabel *label)
} }
} }
ValidationError::ValidationError(QObject *parent, QLabel *label) : QObject(parent), m_pLabel(label) ValidationError::ValidationError(QObject *parent, QLabel *label) : QObject(parent), m_label(label)
{ {
if (m_pLabel) { if (m_label) {
clear(m_pLabel); clear(m_label);
} }
} }
@ -37,12 +37,12 @@ void ValidationError::setMessage(const QString &message)
{ {
m_message = message; m_message = message;
if (m_pLabel) { if (m_label) {
if (message.isEmpty()) { if (message.isEmpty()) {
clear(m_pLabel); clear(m_label);
} else { } else {
m_pLabel->setStyleSheet(kStyleErrorActiveLabel); m_label->setStyleSheet(kStyleErrorActiveLabel);
m_pLabel->setText(message); m_label->setText(message);
} }
} }
} }

View file

@ -21,7 +21,7 @@ public:
private: private:
QString m_message; QString m_message;
QLabel *m_pLabel = nullptr; QLabel *m_label = nullptr;
}; };
} // namespace validators } // namespace validators