Removed hardcoded values from tst_qgraphicsview::scrollBarRanges

Instead of testing the "windows" and "motif" styles, that test should
actually test the scrollBarRanges for all available styles. To be able
to do that, the magic numbers 16 (width/height of scrollbars) and 4
(spacing for the faux motif style) were replaced and instead of setting
the explicit values in the data the "number of scrollbars/spacings to
add/remove" is saved in a struct and the value of these (depending
on the style) is obtained in the test run.

This change does not also cause the fusion style to also be tested but
also fixes this test for Windows 7 and 8 (Aero) where the scrollbar
width/height is not 16 but 17.

Task-number: QTBUG-28611
Task-number: QTBUG-29002
Change-Id: I5d103018fde81cee6e6e89cd414426768b2dc8e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
tst_bic: Remove 'timex' class from linux-gcc-{amd64,ia32}

'timex' is not a Qt class, so there is no need to check it.

Change-Id: Ic77b3518e5a7eaf2c2bc7dcd98d1f9aebf4b655d
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
More explicit QCocoaAccessibleElement memory mngmt

Don't autorelease in the elementWithInterface function,
rename it to createElementWithInterface. The element
can then be released immediately or autoreleased ("delete
later").

Change-Id: I155a85404c34d756c1752eb7c24a7fb0f3cf2e77
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Don't scale 0-region or region without rects

Change-Id: Ieb523dadc5d726e26645b3a90652be95c2707ea8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Compile in 32-bit mode.

CGRect == NSRect only in 64-bit mode.

Change-Id: I069b5b050ccf02654a65375c3ab0f58f7d5cc659
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The executables always go into QT_HOST_BINS.

Task-number: QTBUG-28922

Change-Id: I7afaee292a0026d67866e4f1f711296adee8f8de
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Update translucency correctly in QtWidgets.

Fixes breakage introduced by cdc436ebe625153c626784a15cb224556fca3728 .

Top level widgets with translucent backgrounds were invisible since
opacity was set to 0.

Task-number: QTBUG-28531
Change-Id: I97058ac1b971422f3bda3a5ffed479ec55bfe5d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Support MinGW for CTest test cases

Change-Id: I581701f0b830292a21bc805da0398cbc96f82918
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Use pos() if the widget is a child of a native window

If the widget is embedded in a native window then pos() should be used
instead of mapToGlobal() so that the right position is used. This was
reproduced with the qtwinmigrate solution as the dialogs were not
centered correctly.

Change-Id: I2ce7771f8c1a73aa74ab11faf4f9c57b922eefab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
qdoc: Fix some old links and references to Nokia

Change-Id: I06535a7e301c3986fb104b7092934e8925bacd39
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
qmake: Add application icon support for windows

A new qmake's variable RC_ICONS is introduced to specify the icons.
The first one will be used as the application's icon.

Change-Id: I4218db795837d470087dff8526eb0e4cb81ce5ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Don't assume QSurfaceFormat's stencil buffer size is >= 0

The value -1 is used to indicate no stencil buffer, so we have to check
for sizes <= 0 when deciding whether or not to triangulate the path in
QOpenGL2PaintEngineExPrivate::fill().

This fixes an issue where filling a path would end up filling the whole
outline of the path, which was very visible with fonts over a certain
size (when we go from using the glyph cache to drawing filled paths
for each glyph).

Change-Id: Iafa96124481936db1e5109bba6166a6038c7ca83
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Add an autotest for Canadian locale(dateFormat)

Change-Id: I68a91a418c418e113ecfe66769a7b3bc46de380c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Protect Q_UNREACHABLE and Q_ASSUME by Q_ASSERT.

Both Q_UNREACHABLE and Q_ASSUME with an invalid condition can produce
really weird side effects and crashes.

Change-Id: I4d808c705ae98388ef5853e6539b70bd5e5ad34b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Doc: cleanPath also normalizes separators

Change-Id: I0e5c1cd45ad90fceaed931b7014b4542e8aaa9d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Ignore WasDeclaredAsMetaType flag during binary check.

Nobody should break ODR, but we were living with apps breaking it
for at least 8 years. Sure it is an undefined behavior but in many
cases it works. I do not think that Qt should enforce usage of
a proper C++, it is role of a tool chain. Qt can only indicate that
something is going terribly wrong.

Make message a bit more verbose. Sometimes the ODR violation is not
that easy to fix, therefore a hint is a nice addition.

Update documentation of qRegisterMetaType.

Change-Id: I61dcccc840eec80a4ed5b8a212a912807d239d8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix QVariant in a static build.

The patch cases registration of QVariant handler for widgets.

Task-number: QTBUG-28528
Change-Id: I645e8054bb96db0b92edf5df36f206ec1965ad40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix socket binding on mingw builds

The mingw headers lack the IPV6_V6ONLY define, depending where you get
them from. Currently the headers provided by mingw-builds are more
complete than those from mingw.org itself.
I have removed the compile time check, defined the macro if it is
undefined, and it should be just a runtime check for if you are running
on windows XP you get no dual stack binding.

Task-number: QTBUG-28787
Task-number: QTBUG-28971
Task-number: QTBUG-28972
Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54
Reviewed-by: Ilya Sidorov
Reviewed-by: Peter Hartmann <phartmann@rim.com>
fix linuxfb crash on program start

the KDGETMODE ioctl should use a pointer to int as param,
not a pointer to pointer to int, otherwise it may crash

Change-Id: Ie255d240f3b6ca1ff5398f972308116135374ae3
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Clear backingstore for windows with alpha channel.

Fixes painting artifacts in translucent windows.

Task-number: QTBUG-28531

Change-Id: I00a7a86f88a40d356fa3e37bd497a288b2118469
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>