fix namespaced build

rule 1: QT_USE_NAMESPACE in qt code itself is a bad idea
rule 2: don't forget to forward-declare your non-qt types

Change-Id: Ifba69328f3451e708c26624f349485e7c61d31f5
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Merge branch 'stable' into hawaii-stable