Utils: Remove "ok" and "error" colors accessors for FancyLineEdit

Change-Id: I4e6706f284182226da8c9815394f36e9764feab2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2019-12-19 12:25:05 +01:00
parent 0153962fec
commit 1519dbf0c7
5 changed files with 5 additions and 67 deletions

View File

@@ -133,19 +133,18 @@ public:
QString m_lastFilterText;
QColor m_okTextColor;
QColor m_errorTextColor;
const QColor m_okTextColor;
const QColor m_errorTextColor;
QString m_errorMessage;
};
FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :
QObject(parent),
m_lineEdit(parent),
m_completionShortcut(completionShortcut()->key(), parent)
m_completionShortcut(completionShortcut()->key(), parent),
m_okTextColor(creatorTheme()->color(Theme::TextColorNormal)),
m_errorTextColor(creatorTheme()->color(Theme::TextColorError))
{
m_okTextColor = creatorTheme()->color(Theme::TextColorNormal);
m_errorTextColor = creatorTheme()->color(Theme::TextColorError);
m_completionShortcut.setContext(Qt::WidgetShortcut);
connect(completionShortcut(), &CompletionShortcut::keyChanged,
&m_completionShortcut, &QShortcut::setKey);
@@ -451,28 +450,6 @@ void FancyLineEdit::setFiltering(bool on)
}
}
QColor FancyLineEdit::errorColor() const
{
return d->m_errorTextColor;
}
void FancyLineEdit::setErrorColor(const QColor &c)
{
d->m_errorTextColor = c;
validate();
}
QColor FancyLineEdit::okColor() const
{
return d->m_okTextColor;
}
void FancyLineEdit::setOkColor(const QColor &c)
{
d->m_okTextColor = c;
validate();
}
void FancyLineEdit::setValidationFunction(const FancyLineEdit::ValidationFunction &fn)
{
d->m_validationFunction = fn;