Commit f36fc6e1 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

EmbeddedLinux: Fix target being offered when not useful



Change-Id: I33e5d7f6e5ccda49b693d0f46acd9e1254428f35
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent b0ec3c13
...@@ -82,8 +82,12 @@ QSet<QString> EmbeddedLinuxTargetFactory::targetFeatures(const QString & /*id*/) ...@@ -82,8 +82,12 @@ QSet<QString> EmbeddedLinuxTargetFactory::targetFeatures(const QString & /*id*/)
QStringList EmbeddedLinuxTargetFactory::supportedTargetIds(ProjectExplorer::Project *project) const QStringList EmbeddedLinuxTargetFactory::supportedTargetIds(ProjectExplorer::Project *project) const
{ {
Q_UNUSED(project); if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(project))
return QStringList() << RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID; return QStringList();
if (QtSupport::QtVersionManager::instance()->supportsTargetId(RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID))
return QStringList() << QLatin1String(RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID);
return QStringList();
} }
bool EmbeddedLinuxTargetFactory::supportsTargetId(const QString &id) const bool EmbeddedLinuxTargetFactory::supportsTargetId(const QString &id) const
...@@ -125,7 +129,6 @@ bool EmbeddedLinuxTargetFactory::canCreate(ProjectExplorer::Project *parent, con ...@@ -125,7 +129,6 @@ bool EmbeddedLinuxTargetFactory::canCreate(ProjectExplorer::Project *parent, con
return supportsTargetId(id); return supportsTargetId(id);
} }
ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Project *parent, ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Project *parent,
const QString &id) const QString &id)
{ {
...@@ -134,9 +137,6 @@ ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Pro ...@@ -134,9 +137,6 @@ ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Pro
QList<QtSupport::BaseQtVersion *> knownVersions = QList<QtSupport::BaseQtVersion *> knownVersions =
QtSupport::QtVersionManager::instance()->versionsForTargetId(id); QtSupport::QtVersionManager::instance()->versionsForTargetId(id);
if (knownVersions.isEmpty())
return 0;
QtSupport::BaseQtVersion *qtVersion = knownVersions.first(); QtSupport::BaseQtVersion *qtVersion = knownVersions.first();
QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment