Commit 60578cb5 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Add validChanged(bool) to PathChooser.

This is useful when e.g. connecting directly to the setEnabled() slot of
a Widget.
parent 2a7fa041
......@@ -138,8 +138,10 @@ void BaseValidatingLineEdit::slotChanged(const QString &t)
m_bd->m_state = newState;
m_bd->m_firstChange = false;
setTextColor(this, newState == Invalid ? m_bd->m_errorTextColor : m_bd->m_okTextColor);
if (validHasChanged)
if (validHasChanged) {
emit validChanged(newState == Valid);
emit validChanged();
}
}
}
......
......@@ -81,6 +81,7 @@ public:
signals:
void validChanged();
void validChanged(bool validState);
void validReturnPressed();
protected:
......
......@@ -108,6 +108,7 @@ PathChooser::PathChooser(QWidget *parent) :
connect(m_d->m_lineEdit, SIGNAL(validReturnPressed()), this, SIGNAL(returnPressed()));
connect(m_d->m_lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(changed(QString)));
connect(m_d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
connect(m_d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
connect(m_d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
m_d->m_lineEdit->setMinimumWidth(200);
......
......@@ -99,6 +99,7 @@ private:
signals:
void validChanged();
void validChanged(bool validState);
void changed(const QString &text);
void editingFinished();
void beforeBrowsing();
......
Supports Markdown
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