Commit 2e833208 authored by Tobias Hunger's avatar Tobias Hunger

FancyLineEdit: Remove setTextColor

It is unused now.

Change-Id: I6627754f1f49e18767955a4647270638ec9fad4b
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent e9370ccf
......@@ -411,13 +411,6 @@ void FancyLineEdit::setOkColor(const QColor &c)
validate();
}
void FancyLineEdit::setTextColor(QWidget *w, const QColor &c)
{
QPalette palette = w->palette();
palette.setColor(QPalette::Active, QPalette::Text, c);
w->setPalette(palette);
}
void FancyLineEdit::setValidationFunction(const FancyLineEdit::ValidationFunction &fn)
{
d->m_validationFunction = fn;
......@@ -478,7 +471,11 @@ void FancyLineEdit::validate()
const bool validHasChanged = (d->m_state == Valid) != (newState == Valid);
d->m_state = newState;
d->m_firstChange = false;
setTextColor(this, newState == Invalid ? d->m_errorTextColor : d->m_okTextColor);
QPalette p = palette();
p.setColor(QPalette::Active, QPalette::Text, newState == Invalid ? d->m_errorTextColor : d->m_okTextColor);
setPalette(p);
if (validHasChanged)
emit validChanged(newState == Valid);
}
......
......@@ -147,8 +147,6 @@ public:
QColor okColor() const;
void setOkColor(const QColor &c);
static void setTextColor(QWidget *w, const QColor &c);
void setValidationFunction(const ValidationFunction &fn);
static ValidationFunction defaultValidationFunction();
void validate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment