Fix drawCachedGlyphs on RGBA8888

drawCachedGlyphs draws with the wrong color on RGBA8888. The issue
is that the draw routines bitmapblit_quint32 and alphamapblit_quint32
while safe to use on rgba formats, needs to have the input color
converted.

This patch adds small wrapper functions for bitmapblit and alphamapblit
that converts the formats. Two tests are extended to ensure we have
test coverage.

Change-Id: I5f99f3795eba46a69d4df5b167e6099024e9a060
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
CSS parser: fix the pseudo-classes array length

The pseudoclass array is declared with length "NumPseudos - 1",
but the declaration has actually 44 elements, not 45.

This caused a zero-initialized last element to be silently appended
to the array. The zero-initialized element broke the sorting
of the array, which in turn broke std::lower_bound usage
(although of course the problem was there from before switching
to the standard library algorithms).

Task-number: QTBUG-36933
Change-Id: I8a02891fc36761b6ae72d15a0a8d6c6a96813947
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Cocoa Menu: Set keyboard modifiers when item is activated

Seems to be a regression from 4.8, which is not surprising
since everything was rewritten for QPA.

Task-number: QTBUG-36851
Change-Id: If89f8c9e6897fd1e02800f49e51baeb1ea181238
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Cocoa Menus: Give platform menu ownership back to QWidgets

We don't want to be in the situation where a QCocoaMenuItem
owns a QCocoaMenu (because that item is a submenu), and then
the actual QMenu "sees" that same QCocoaMenu being deleted.

Instead, since all the QCocoaMenu* classes inherit QObject,
we rely on meta-object properties to set the hierarchy and
climb the hierarchy when guessing the menu item's role.

This ammends most of commit 370e89f06465a4d61c7b.

Task-number: QTBUG-36785
Change-Id: I0e03acb593e93061c8c6c1fdd161669cf0d2a293
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
do not use fileno calls in forked child

This fixes an issue that causes QProcess::start to silently fail on
OS X 10.9. Apparently, fileno(stdout) locks the handle on OS X 10.9.
It may happen that the parent process fflush()s stdout while the child
has just been forked. The stdout lock of the parent is never released
in the child and fileno(stdout) therefore locks forever.

According to the fork documentation on opengroup.org one may only call
async-signal-safe functions between fork and exec in the child. The
fileno() function does not appear in the list of async-signal-safe
functions. Also, fileno(stdout) and friends can be easily replaced by
the standard constants STDOUT_FILENO etc.

Done-with: Fawzi Mohamed <fawzi.mohamed@digia.com>
Task-number: QTBUG-37306

Change-Id: I2b1f5f47cc48a1ad020fb0493a955d2bc27aeb47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from b2216bbe06b8be2bef6d8bc2ffff1337f6d23358)
Remove calls to setlocale in QtOpenGL cube example.

This is causing compilation errors on some Windows CE
configurations:

mainwidget.cpp(130) : error C3861: 'setlocale': identifier not found
mainwidget.cpp(149) : error C3861: 'setlocale': identifier not found

Change-Id: Ie863cd7c9c53cfef4074dabffe157d9068654a1c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Disable splashScreenModality test: dialog is going under splash screen

That's a bug, but this test causes CI problems until it's fixed.

Task-number: QTBUG-35169
Change-Id: I27b3a61437312d2217743670fa14510d9340d8c1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
Fix Mac Bearer when machine has no wifi

This manifested itself for some continuous integration machine, all
regular macs have wireless. In case there is no wifi, we would never
emit updateCompleted().

Change-Id: I1c5b0da6e1d73fef2588beb1796207326d430e26
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Removed unnecessary TESTDATA statement from qmessageauthenticationcode.

QMessageAuthenticationCode autotest does not have data folder for
TESTDATA. It seems that pro file is copy/pasted from another one which
actually have data. Removed the unnecessary statement since it caused
problems for https://codereview.qt-project.org/77981.

Change-Id: Ide753e5692bd2f469217760173a9b60f2f646770
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Doc: Fix issue in QThread example code

Added a missing reference operator to make the code example
compile.

Task-number: QTBUG-37359
Change-Id: Ie52f65ab3b325daf1ee3b368131e54c8a17f92ef
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Fix WinRT design-mode manifest location.

QMake always places makefiles, including vcproj files, to OUT_PWD.

BUILD_DIR i.e. QMAKE_RESOLVED_TARGET refers to location where target
is generated. If TARGET is specified in pro file with path, such as:

    TARGET = ../../debug/tst_qlocale

The QMAKE_RESOLVED_TARGET refers to that path, and it differs from OUT_PWD.

Because Visual Studio requires a design-mode manifest in the same location
as the vcproj, resolved BUILD_DIR separately based on TEMPLATE.

Change-Id: I8dbaa862a5f53ac168f4643c17baabd7b4f0287d
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix docs: QT_FATAL_WARNINGS acts when not empty

Change-Id: If68b98459eab3186e2f3d44f087b753d2c57b79d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Make android non-prefix shadow build usable

Until now android developer build was not usable due to missing files.
These files are only available after a make install.
This patch aims to add that copy phase when building.

Task-number: QTBUG-36901
Change-Id: If0a7e982899b8c18495c7cb6508184fa153b239d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add sizeLessWindow test case.

Verify that QOpenGLContext works with QWindows that
do not have an explicit size set.

Task-number: QTBUG-35342

Change-Id: I91be7beb0062c5825fc58273c701c396b6423256
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Implement QStandardPaths::GenericConfigLocation for WinRT.

Same logic for locaton used as in other Windows variants.

Change-Id: I5f71710d28ea1338748c9bd41d48bba15e674baa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Disable UNC tests on WinRT.

Based on file system implementation for WinRT, the UNC paths are not
supported on WinRT, so lets disable corresponding tests as well.

Change-Id: Ib45ae618f39d5da39a822160096599b30204cf71
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Cancel NSURLConnections before releasing them.

Task-number: QTBUG-37042

Change-Id: I7ddcbc315b4b720e7da7880fc00731c28beb4bb2
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Don't show evaluation popup for unsupported evaluation

Do not show the popup for unsupported evaluations on every launch of a
QWidget based application. This is causing problems e.g. for applications
that are run by Qt Creator in the background, like qmlpuppet.

Instead, we'll show a similar dialog on Qt Creator startup.

Change-Id: I6b44c24865ed6992a70f8a9dd0bcd08a4744cb28
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
correct send vs sent grammar

Correct the tense of send vs sent in comments and documentation.

Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
fix warning

Change-Id: I7afedbf679ae1c8467eea749e79eb10f2516d039
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>