Fix rubberband selection in rotated GraphicsView

Selection rectangle was incorrectly mapped to scene space when the
view was rotated. It became a rotated rectangle instead of the correct
polygon (rhombus).

Task-number: QTBUG-42008
Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
QGraphicsScene: stabilize stacking order of toplevel items

Removing and adding toplevel items could result in invalid stacking
order (not corresponding to insertion order).

Task-number: QTBUG-19316
Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Add support for "Apple Roman" encoding

Substitute this encoding by "macintosh" when Qt is built with ICU.
It is for compatibility with Qt 4.x.

Change-Id: I70c51cba7d473ac81e25862736cb71a2f6894055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix doc about the list of supported codecs

Replace "Apple Roman" by "Macintosh" which is registered by IANA:
http://tools.ietf.org/html/rfc1345.
Replace unsupported "GB18030-0" by "GB18030".
Remove "JIS X 0201" and "JIS X 0208" as they are supported as parts of
other Japanese encodings but not directly.
Add "HP-ROMAN8" which is supported by both Qt and ICU.
Also clean the codecs test.

Change-Id: Iaf8e8ff1900d3f92ea0e0df75c60fe1534de23ac
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Doc: Fix CustomStyle snippet

Add missing semicolon, include QtWidgets instead of QtGui and
use cast for a const pointer because the example with casting
relates to the code above where 'widget' is const.

Task-number: QTBUG-31736
Change-Id: I5cb6d33ec692deaf41e9a1be9e36e752a8da8739
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Add support for more font weights internally

We should have more font weights in QFont::Weight to allow for
finer grained control.
For the time being, we can simply use intermediate weights to better
support the different font weights falling in between the ones
defined in QFont::Weight.
Also amend the documentation to clarify the fact that QFont supports
and can return weights falling outside the predefined values, which
is already the case (e.g. when using fontconfig).

Done-with: Gabriel de Dietrich
Change-Id: I693cdd48b8b77e7ed550cdf991227bcb819d8e7b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
iOS: Make room for zero-terminator when building argv from NSProcessInfo

[NSString lengthOfBytesUsingEncoding] only returns the number of bytes
required for the actual string, not including the zero terminator, so
when we then used cStringUsingEncoding to fill the malloced buffer with
data, we overwrote the byte after our buffer with 0, resulting in random
and hard to reproduce crashes at application startup, seemingly depending
on the application name.

Change-Id: I35d261bea5924e917475b0270bfa280bfb0c787a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Android: Keyboard doesn't hide from done button

QLineEdit commits and hides QInputMethod on enter key press. When
Qt::ImhMultiLine input method hint is set, virtual keyboard is not
hidden.

Task-number: QTBUG-37850
Change-Id: I018351caa18bd2116665771e5f024a57182a01b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add extra declarations to make rcc output pass -Wmissing-declarations

The previously produced code was valid C++.  Add the declaration
nevertheless to help people who want to use the switch in their
own code.

Task-number: QTBUG-42119
Change-Id: Ia47cf3930684474ff65e5cf37335d7d7f57a1d31
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add searchEdit as accessible state

The search state is used by VoiceOver on iOS to announce a search field.

Change-Id: I464125827dbbf275daf38104e26e9591bb23365a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>