Mark the QArrayData alloc/dealloc functions as nothrow

Throwing is handled at a higher level.

Change-Id: I573e4ded135b61e35fbe6e188be09acf449911fc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Redo the Q_FOREACH loop control without GCC statement expressions

It's possible to do without them, which probably makes the number of
supported compilers a lot bigger: they just need to support decltype()
or __typeof__.

That includes the Intel compiler. The old code was also apparently
working, but no one had realized the old workaround for some old version
was still in place.

The loop overhead is more or less the same. I have not done benchmarks,
but inspection of the generated assembly shows more or less the same
number of instructions.

Change-Id: I32d499c84a6ddd19d994b49f17a469acb5c3a3f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Add the option of using decltype() in Q_FOREACH

This should allow more compilers to use the shorter & simpler version of
the macro.

Change-Id: Ibd2bf20f479b707a7806d0265a5580ebfc2e7733
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Bump Qt version to 5.4.0

Change-Id: I9eea1d2e383aff7eec4817b17c098a6fcc03e041
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Prefer QPA implementation in qsystemtrayicon_x11 if available

In order to have the possibility to provide a custom QSystemTrayIcon
implementation in the platform theme instead of the X11 xembed based
one, the qpa implementation needs to be called. This was not possible
as qpa and x11 implementation were compile time mutual exclusive.

This change moves the qpa implementation in the shared part and the
methods in qsystemtrayicon_qpa just delegate to them. In addition the
_x11 part tries to create a QPlatformSystemTrayIcon through the
platform theme and if that succeeds the implementation prefers the qpa
variant and delegates to the same methods.

Change-Id: I6b33acac63524a77ebdce39af6eb74666f8c7561
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Doc: Correct typos in QModelIndex::internalId() documentation

Change-Id: Iea2fd83764711889b828997d56b9f7dcdbdd75fb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Improve error reporting in selftests of testlib.

Output the file name and fix line number to be 1..n.

Change-Id: I3ba7f84b99ce3664bc3e403b230307511b15fe1f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
QtCore: Fix MSVC 64bit warnings about conversion from size_t to int.

warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: I9be380cbb7bed4cd95515074c7cad7e41a511dc9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
QPainterPath: replace a use of QList<QRectF> with a QVector

QList<QRectF> is horribly inefficent, and this is just implementation,
so we're free to change it.

Change-Id: I7b28a2093efb5826b55c172f48a81cb9c2472e5a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMdiArea: replace uses of QList<QRect> with QVector

A QList<QRect> is horribly inefficient, and this is private API, so we're free to
change it.

Change-Id: I26c2be51393f883d160b86ed1414f801f211df39
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMdiArea: replace dubious use of QSet<int> with QVector

The code populated two QSets with some x and y coordinates and went
on to get the values as a list. Since QSet is unordered_set, those
lists were not sorted, so the code did that manually. It then went
and created the cross product of the two lists as a list of QPoints.

Since QSet is a node-based container and not even an ordered one,
the code pays a hefty price just for ensuring uniqueness of values
prior to sorting.

The new code just cramms everything into vectors, duplicates and all,
then sorts the vectors and only then removes duplicates using
std::unique. Since the sizes of all containers involved are known
ahead of time, make liberal use of reserve() to trim the whole
container business down to three memory allocations.

Change-Id: I7004b1b90b3142acb12d7bb12bcd0014d54e6e02
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QMdiArea: don't use out parameters, return by value

Change-Id: I787b56033899d6845886c4707cf3acf7428f94a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
xcb: replace a use of an inefficient QList with QVector

The Transaction type is larger than a void*, so better use
a vector to hold them.

Change-Id: Ie2c00d053f67addbce6fd8107f659c56ccdd37aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
xcb: replace inefficient uses of QList with QVector

xcb atoms are uint32s, so a QList of them wastes 50% memory on 64-bit
platforms. Other parts of the code already store xcb_atom_t's in QVector,
so use QVector everywhere (also leads to less code expansion).

Change-Id: Ib4afb35e499577a7509d04a18b830d9b31f6abd0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
QtNetwork: add qMove() to QSharedPointer uses where applicable

QSharedPointers here are passed by value - good, since it enabled C++11 move semantics,
transparently.

However, when passing such parameters on to assignment operators or other functions,
copies were made where moves would have been sufficient. Thus, add some qMove()s.

Change-Id: Ied1a5edf1bfbb16108dfeefbe85e58ab3d4ef92f
Reviewed-by: Richard J. Moore <rich@kde.org>
QNX: Unified qplatformdefs

ARM and x86 platform defines are identical, so they can be kept in a
common file.

Change-Id: I6f79cadb2e5ce265e4a5a7a0806379dc8793e539
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Use new QLibraryInfo::build() in testlib to log build information.

This produces:

********* Start testing of tst_QtJson *********
Config: Using QtTest library 5.3.0, Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)
PASS : tst_QtJson::initTestCase()

<?xml version="1.0" encoding="UTF-8"?>
<TestCase name="tst_QtJson">
<Environment>
<QtVersion>5.3.0</QtVersion>
<QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild>
<QTestVersion>5.3.0</QTestVersion>
</Environment>

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="1" failures="1" tests="42" name="tst_QtJson">
<properties>
<property value="5.3.0" name="QTestVersion"/>
<property value="5.3.0" name="QtVersion"/>
<property value="Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)" name="QtBuild"/>
</properties>

<Environment>
<QtVersion>5.3.0</QtVersion>
<QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild>
<QTestVersion>5.3.0</QTestVersion>
</Environment>

[ChangeLog][QtTest] Tests now output build information.

Change-Id: I0ab473371575f2b807db725256805b8bffea3454
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
	src/network/access/qhttpthreaddelegate.cpp

Change-Id: Ia15372687c93cd585967b006c0baaac3a5f29e91
Fix focus in Active Qt webbrowser.

Active X controls may cause WM_SETFOCUS/WM_KILLFOCUS to be sent to
native child windows. Ensure the focus widget is set correctly in
these cases.

Task-number: QTBUG-37126
Change-Id: I2a4cbb148eab48e47ca3f37b2076020c95d213a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
QSharedPointer: implement move ctor

Change-Id: I46974aa1d056be797db959b547a1516157b598ca
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>