[KDialog] Fix --attach argument by watching for QDialog
We ported from KDialog to QDialog and thus this code path was never actually executed.
Differential Revision: https://phabricator.kde.org/D5040