Fix compilation when QT_NO_PRINTDIALOG is defined

Seems like QT_NO_PRINTER does not imply QT_NO_PRINTDIALOG,
so both need to be checked.

Change-Id: I164e602e75ebb524a33cfacaad68023e33f8978f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>