diff --git a/src/plugins/qmakeprojectmanager/qmakebuildinfo.h b/src/plugins/qmakeprojectmanager/qmakebuildinfo.h index 41d2922e6e7..59e71c56edd 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildinfo.h +++ b/src/plugins/qmakeprojectmanager/qmakebuildinfo.h @@ -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 reportIssues(const QString &projectPath, const QString &buildDir) const { diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp index 1a2395b5ef9..2ec868ba11e 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp @@ -163,7 +163,17 @@ QList QmakeProjectImporter::import(const Utils::Fi info->additionalArguments = additionalArguments; info->makefile = makefile; - result << info; + bool found = false; + foreach (ProjectExplorer::BuildInfo *bInfo, result) { + if (*static_cast(bInfo) == *info) { + found = true; + break; + } + } + if (found) + delete info; + else + result << info; } }