Check if the file is already used in the .pro file.
And refuse to add it twice. The check is pretty simplistic in that it doesn't take scopes or which variable it's exactly in into account. But in those cases you need to edit the .pro file manually anyway. Task-Nr: QTCREATORBUG-932 Task-Nr: QTCREATORBUG-891 Task-Nr: QTCREATORBUG-653