Utils: Fix manual usage of PathChooser

When manually typing inside a PathChooser that expects an
existing command it was no more possible to type a trailing
slash without tricking the PathChooser.

Change-Id: Ie30e7b0de030f4a3d64fce89ed799c03a594261d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-05-14 10:09:31 +02:00
parent d5ffac83e7
commit 2653cb229c

View File

@@ -223,7 +223,7 @@ PathChooser::PathChooser(QWidget *parent) :
[this] { emit rawPathChanged(rawPath()); });
connect(d->m_lineEdit, &FancyLineEdit::validChanged, this, &PathChooser::validChanged);
connect(d->m_lineEdit, &QLineEdit::editingFinished, this, &PathChooser::editingFinished);
connect(d->m_lineEdit, &QLineEdit::textChanged, this, [this] { emit pathChanged(path()); });
connect(d->m_lineEdit, &QLineEdit::textChanged, this, [this] { emit pathChanged(d->m_lineEdit->text()); });
d->m_lineEdit->setMinimumWidth(120);
d->m_lineEdit->setErrorColor(creatorTheme()->color(Theme::TextColorError));