forked from qt-creator/qt-creator
qmakeprojectimporter: avoid adding duplicate entries
ios having multiple makefiles gets detected several times and one ends up with 5 times the same entry when conviguring a project that was already present Change-Id: I5685208305d1f489c5502d5aec0c08dded49da90 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -48,6 +48,17 @@ public:
|
||||
QString additionalArguments;
|
||||
QString makefile;
|
||||
|
||||
bool operator==(const QmakeBuildInfo &o) {
|
||||
return displayName == o.displayName
|
||||
&& typeName == o.typeName
|
||||
&& buildDirectory == o.buildDirectory
|
||||
&& kitId == o.kitId
|
||||
&& typeName == o.typeName
|
||||
&& supportsShadowBuild == o.supportsShadowBuild
|
||||
&& type == o.type
|
||||
&& additionalArguments == o.additionalArguments;
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::Task> reportIssues(const QString &projectPath,
|
||||
const QString &buildDir) const
|
||||
{
|
||||
|
@@ -163,6 +163,16 @@ QList<ProjectExplorer::BuildInfo *> QmakeProjectImporter::import(const Utils::Fi
|
||||
info->additionalArguments = additionalArguments;
|
||||
info->makefile = makefile;
|
||||
|
||||
bool found = false;
|
||||
foreach (ProjectExplorer::BuildInfo *bInfo, result) {
|
||||
if (*static_cast<QmakeBuildInfo *>(bInfo) == *info) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
delete info;
|
||||
else
|
||||
result << info;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user