Added guards around Qt5-only code