Fix a crash when selecting the scene graph root node.

(cherry picked from commit a2fa7dd0fca3d4026252fe54c9876b972e350d24)
Fix an assert in Qt 5.4 when dealing with connections to slot objects.

(cherry picked from commit b8677cd28d2c07b72e41e3fab45e265017f4e0b7)
Fix another assert in Qt 5.4 on connections to a slot object.

(cherry picked from commit 8e00e2420d4c51d1e7601d2365c182a430a2556b)
There seem to be OpenGL stacks that don't even define GL_DOUBLE.

(cherry picked from commit dddefcd0008776f1a83e973cc686736b81189129)