diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h
index 5e1c17dfb60ceca947259c2d6067868ad4150751..eeeb52c8f9c9f3e62c1ab4844f2a38966db86887 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.h
+++ b/src/plugins/qt4projectmanager/qt4nodes.h
@@ -278,8 +278,8 @@ struct QT4PROJECTMANAGER_EXPORT TargetInformation
         return workingDir == other.workingDir
                 && target == other.target
                 && executable == other.executable
-                && valid == valid
-                && buildDir == buildDir;
+                && valid == other.valid
+                && buildDir == other.buildDir;
     }
     bool operator!=(const TargetInformation &other) const
     {