Fixed crash in image reader when reading certain BMP files.

If the high bit in a mask is set, for instance if the mask is
0xff000000, and we shift it to the right by 24 positions, since the mask
was not declared as unsigned we ended up with a mask value of
0xffffffff. We then add 1 to this value and divide by the result,
causing a division by zero crash.

The masks need to be declared unsigned to prevent sign bit extension
when shifting right.

Task-number: QTBUG-29194
Change-Id: I1003d546a70d540b5c135b6b75dee9b4962a7210
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
(cherry picked from qtbase, af84313c622af880e95d461ea8b7dbca58d2dffa)
QNX: Don't let eglMakeCurrent() fail when using two contexts.

When calling eglMakeCurrent(), egl config and window format
must match, otherwise it fails with EGL_BAD_MATCH.

egl config and window format were static variables, this could lead
to a context setting the window format in the ctor but, at the
time of creating a surface, another context had changed the window
format.

elg config and window format are now member variables. This is the
same approach taken in Qt5.

Change-Id: I4fa0bc59273b856c1eaf43fafd15b551363f2fe2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QProcessEnvironment: Permit magic cmd variables

The cmd shell inserts magic variables starting with a = into the
environment.

Task-number: QTCREATORBUG-8716
Change-Id: I2f140032aea4fb1d77633c6baf90d7b536e2812a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/e7a242b27b961c64613542c75c69954d1c7bd315)