forked from qt-creator/qt-creator
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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user