Add an enabled property in locator, and used it instead of hidden.

Disabled locator won't be displayed in the filter list, but will be
visible in the option page.

Change-Id: I4d39bb8ed04ce49fc34aa84c229b51f26fc70733
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Nicolas Arnaud-Cormos
2011-10-27 19:24:46 +02:00
committed by Eike Ziller
parent 19b1a06ec8
commit ba15f8ec2c
6 changed files with 26 additions and 12 deletions

View File

@@ -54,6 +54,9 @@ CMakeLocatorFilter::CMakeLocatorFilter()
this, SLOT(slotProjectListUpdated()));
connect(sm, SIGNAL(projectRemoved(ProjectExplorer::Project*)),
this, SLOT(slotProjectListUpdated()));
// Initialize the filter
slotProjectListUpdated();
}
CMakeLocatorFilter::~CMakeLocatorFilter()
@@ -140,6 +143,6 @@ void CMakeLocatorFilter::slotProjectListUpdated()
break;
}
// Hide the locator if there's no CMake project
setHidden(!cmakeProject);
// Enable the filter if there's at least one CMake project
setEnabled(cmakeProject);
}