ProjectExplorer: Using function objects for kit matching

Change-Id: I377298385df345a6d30217bb018964a64897d42e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
hjk
2014-07-23 09:09:20 +02:00
parent bf5e43be94
commit 71c6d4d771
17 changed files with 173 additions and 278 deletions

View File

@@ -77,6 +77,7 @@
#include <QAction>
#include <QtPlugin>
using namespace ProjectExplorer;
using namespace Qnx::Internal;
QnxPlugin::QnxPlugin()
@@ -178,11 +179,10 @@ ExtensionSystem::IPlugin::ShutdownFlag QnxPlugin::aboutToShutdown()
void QnxPlugin::updateDebuggerActions()
{
bool hasValidQnxKit = false;
ProjectExplorer::DeviceTypeMatcher qnxTypeMatcher(Constants::QNX_QNX_OS_TYPE);
const QList<ProjectExplorer::Kit *> qnxKits = ProjectExplorer::KitManager::matchingKits(qnxTypeMatcher);
foreach (ProjectExplorer::Kit *qnxKit, qnxKits) {
if (qnxKit->isValid() && !ProjectExplorer::DeviceKitInformation::device(qnxKit).isNull()) {
KitMatcher matcher = DeviceTypeKitInformation::deviceTypeMatcher(Constants::QNX_QNX_OS_TYPE);
foreach (Kit *qnxKit, KitManager::matchingKits(matcher)) {
if (qnxKit->isValid() && !DeviceKitInformation::device(qnxKit).isNull()) {
hasValidQnxKit = true;
break;
}