QNX: Fix QMdiWindow autotests

In "setOpaqueResizeAndMove" this patch makes sure that the content of a subwindow
actually fits into the window, otherwise the resize does not work properly.
The content is dpi dependent and thus the pixel size of it increases with the display
dpi value.
Furthermore when moving the QMdiSubwindow this patch makes sure that we actually grab
the window's header and not one of it's tool buttons (minimize, maximize, close).

Change-Id: I88314994957c5883f57c09c9240a3b83f1ee42ed
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Create the 64 bits version strings for MIPS, SPARC and S390

Note that the specialization has to be declared before the common arch
because of how qprocessordetection.h sets this variables. Else
you would still get mips on a mips64 system.

Change-Id: Ief949a5d30aa217c4bfda2d674ec2683e6c130c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove -Wcast-align from QMAKE_CXXFLAGS.

x86 doesn't care about alignment, and on all other platforms where it
does something it causes build errors, so instead of removing it on
those platforms just don't enable it at all.

Change-Id: Idfeb387099b28af60ba161b6ca678b7c9df17fe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Enable sparc detection.

It has been working in Debian for some time.
It also adds detection for 64bits Sparc.

Change-Id: Ie4fc0f58b37672b79191ebe51de0caf2eaf8a1d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Support MIPS atomic on pre-MIPS32 architectures

The atomic functions on MIPS are based on the sync opcode with an
immediate argument, which is something introduced in the MIPS32
instruction set. This prevent to use Qt on pre-MIPS32 CPU, like the
Loongson 2 CPU.

However some of the pre-MIPS32 CPUs interprets the sync opcode with and
immediate argument as a sync opcode without argument (which is a stronger
ordering than with the argument), and for the others the kernel emulates
it.

It is therefore fine to use the current MIPS atomic functions on
pre-MIPS32 CPU. This patch allows that by temporarily changing the
instruction set to MIPS32 around the sync instruction, so that binutils
doesn't choke on it.

Change-Id: I9cc984bd55b5f172736ce9e638a6f4e271b79fe7
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix QFileInfoGatherer threading issue

QFileInfoGatherer has a QFileSystemWatcher member that lives in the
same thread as the QFileInfoGatherer object. If only the poller engine
is available for the file system watcher, the engine will only be
created when addPaths() is called. However the latter was called from
anohter thread (the QFileInfoGatherer thread).
Hence the QPollingFileSystemWatcherEngine had its parent in a different
thread and worse, this thread didn't have an event loop needed for the
QTimer used in the poller engine.

This fixes tst_qfilesystemmodel on platforms that only support the
polling file system watcher engine.

Task-Number: QTBUG-29366
Change-Id: I83b58b4237e3438a27e5cdde4b1e4126e4740a94
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Mac: Don't register for Pan Gestures.

This will enable touch events for the viewport
widget, which has undesired side effects (see task).

Fixes a regression from Qt 4.

Task-number: QTBUG-38815
Change-Id: I7b9c0d1de985d1c82f946140fecf460fcfc5e686
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
move loading of testability driver from QApplication to QGuiApplication

This is useful without QWidget too.

Change-Id: Ic7857e52e4a8f57c1205615a1f30323b486814af
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
XCB: Enable loading of the Qt::DragLinkCursor

It did not load due to an off-by-1 boundary error in a check.
Qt::DragLinkCursor happens to be Qt::LastCursor.

Task-number: QTBUG-39735
Change-Id: Ia7b11fc4eecc4329bd487bd5689c83c986fd2de6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Fix warning message when re-setting text on tooltip

Fix warning message that gets printed when changing tooltip message
without rect and widget parameters for already shown tooltip widget.

Task-number: QTBUG-39550
Change-Id: I69ed8747e5e77ca618525d74479c72e02b7ab897
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Don't convert signed to unsigned when we need all 32bit

The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit
were incorrectly assigning an unsigned value to a signed variable, which
broke their support of images with dimensions from 32384 to 65535.
Images with dimensions higher than that are already using another code-
path.

Task-number: QTBUG-40297
Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
QCoreTextFontDatabase: Fix font weight value when populating a family

kCTFontWeightTrait returns a normalized value between -1.0 (lightest)
and 1.0 (heaviest), 0.0 being the regular font weight. The threshold
values used in this change have been estimated from the weight values
of fonts from the Helvetica Neue and Myriad Pro font families.

Change-Id: I49de8e8bd5894107de4842aeda7ace2e83f95be3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Work around ICC bug in local static symbols for Q_GLOBAL_STATIC

When compiling the innerFunction() of the Q_GLOBAL_STATIC expansion, ICC
emits global symbols for the internal "holder" local static variable and
its guard. If there are two global statics of the same name in two
different .cpp files, the linker will incorrectly merge the two "holder"
variables.

This was noted between the "customTypes" global statics of qmetatype.cpp
and qdbusmetatype.cpp in a static build.

The C++ standard requires that local static variables declared in inline
functions must be the same, regardless of whether the body of the
function got inlined or not. The IA-64 C++ ABI does that by requiring
local static symbols for inline functions to be global and mergeable
("link once"). However, two functions in anonymous namespaces in
different files are not considered to be the same function, so their
local statics should not be merged. This is where ICC failed: the local
statics are global and mergeable, even though the function is in an
anonymous namespace. ICC correctly emits the function itself as a local
symbol.

Alternative solutions were:
  1) add "static", but you can't use a static symbol in a template
     parameter in C++98 mode
  2) remove the "inline" keyword, but then GCC 4.8 will not inline

Intel issue ID: 6000058488
Task-number: QTBUG-40053
Change-Id: I307622222499682dde711b2771c8cf7557400799
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
Fix double clicks in eglfs

The window can be null in the qpa event. This is indicated by the nullWindow
field to be able to differentiate between a dead window and a genuinely
null input.

[ChangeLog] Double click events are now sent correctly on eglfs.

Task-number: QTBUG-40146
Change-Id: I63c8d08e0dec217b929161d2e827e0c273b4dd3e
Reviewed-by: Will Wagner <willw@carallon.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Propagate swapInterval to QGLFormat

Task-number: QTBUG-39370
Change-Id: Ib3a46a0ae24e5f6d690625b1d91be9e599bbc927
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
cocoa: Fix compiler warnings about unused functions.

Change-Id: Id85c86dd2f2468b3ac17751aefdebe0e8666a0c0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Android: export ANDROID_SDK_BUILD_TOOLS_REVISION.

It's needed by androiddeployqt tool to run "zipalign" tool
and to set it to gradle properties.

Task-number:QTBUG-40481
Change-Id: I3dd665a7461a4e981867cdad75a50940e46a5ae6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Add missing power button keycode to keymap

Change-Id: I03682716aaea8344ebb5b71dcea5fe18babcd610
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3