PathChooser: Trigger revalidation when environment or base name change

Trigger a re-evaluation of the state when the base filename or the
environment changes. Both can effect whether a command is found or
not.

Change-Id: I3fcb9683296113e04f7a78bb2d3ae681f6603823
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2014-03-05 12:35:55 +01:00
parent 7f76ef3b18
commit 7e24df1355

View File

@@ -302,15 +302,18 @@ FileName PathChooser::baseFileName() const
void PathChooser::setBaseFileName(const FileName &base)
{
d->m_baseDirectory = base.toString();
triggerChanged();
}
void PathChooser::setEnvironment(const Utils::Environment &env)
{
QString oldExpand = path();
d->m_environment = env;
if (path() != oldExpand)
if (path() != oldExpand) {
triggerChanged();
emit changed(rawPath());
}
}
QString PathChooser::path() const
{