coverity#1130200 Unchecked dynamic_cast

Change-Id: I9a6cfc27b1076fa682c591d920a7db8ec6f8a6ff
convert add relationships dialog to .ui

Change-Id: I984ff7e4fca6e7cd3529e921383bca4e6f2a464e