tst_QTreeView: fix use of uninited variable

Valgrind complained:

==13941== Conditional jump or move depends on uninitialised value(s)
==13941==    at 0x4206FC: tst_QTreeView::styleOptionViewItem()::MyDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (tst_qtreeview.cpp:3062)
[...]

Change-Id: I76da01c191415ba0a00b4b85312f2fe08e4ee2d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QPageLayout: use existing qBound()

instead of rolling our own qt_clamp().

Change-Id: I2729ae3ff98e8c29c66f0f5c792b1bc7bf586f06
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Android: use glyph cache resizing workaround with Vivante GC1000 GPU.

Task-number: QTBUG-38102
Change-Id: I9f423e15b9cbc3d2f424871f47795052b1f53e09
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Use PlistBuddy instead of sed/xpath magic to extract OS X/iOS SDK name

Change-Id: I9e9f9b033cc892a35c86b35f64dc1dd915ad44f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Don't skip QtLocation on iOS.

QtPositioning is supported on iOS since Qt 5.3.

Task-number: QTBUG-37792
Change-Id: I74729f0c99c49858032b68dd0e7c9e628ae77b12
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Don't redefine dynamic_cast if it's already a macro

Redefining macros is always a bad idea. On top of that, MSVC doesn't
like when we #define dynamic_cast, even though the C++ standard
explicitly allows it.

Task-number: QTBUG-29093
Change-Id: I6e33d609ce213cf6a9085faa3f991a873d825dc6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix QNetworkRequest::setRawHeader() for QT_NO_CAST_FROM_BYTEARRAY

Avoid the implicit conversion in the doc snippet.

Change-Id: Iacec6dab371a22c16f537af471f6653d9c5ad43d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Mark Variable Length Arrays as a TS feature for C++14

The feature was removed from the C++14 draft standard and moved instead
to a Technical Specification. Since we don't know how to enable TS
features in GCC 4.9 yet, remove it from the definition.

The Clang definition is probably safe, since it is behind an #if
__has_extension.

Change-Id: Ibc32b35657b046680078b39a7678bd8e1e5395d2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QNetworkReplyHttpImpl: fix misuse of QDateTime::addSecs()

QDateTime::addSecs() is a const function and returns a new QDateTime with
the given seconds added, thus the current statement had no effect.

Found by applying Q_REQUIRED_RESULT in dev branch.

Change-Id: Id712334f91e0adb40bafc23470bf46479334c81a
Reviewed-by: Richard J. Moore <rich@kde.org>
QCUPSSupport: fix misuse of QDateTime::addDays()

QDateTime::addDays() is a const function and returns a new QDateTime with
the given days added, thus the current statement had no effect.

Found by applying Q_REQUIRED_RESULT in dev branch.

Change-Id: I1b061619d45d7806feaa2bf9fb6d9f0b43d63def
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Mac style: Fix one-pixel offset for combo boxes in small size

Change-Id: I744c102bd086742b1052ed547e50037dddff4654
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
HB-NG on Mac: Fix PDF in end of string

The CoreText engine will remove the PDF token from the end of
the string (instead of producing a zero-width glyph for it),
thus the output will be different from the OpenType backend
and Qt will get confused. To fix this, we emulate the expected
behavior by molding the output in a special case.

This is a port of e45c4387ae16627d61e30a58ae901d888d375aa7 from
Qt 4.

Task-number: QTBUG-38113
Change-Id: Ia0a078e3a60317981d4d5a4ee7e575a1714a1d75
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
QNX: Destroy window buffers when resized

QNX version of screen doesn't reallocate window buffers dynamically.
The buffers have to be destroyed and recreated when a window is resized.
As the overhead is minimal this will be done on BlackBerry, as well.

Change-Id: I488942879822c64a6ab1871ebf5d6da9aec144d6
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
QNX: Fix QGraphicsView autotests

On BlackBerry first window is always shown full screen. However, many
tests rely on a specific window size. A dummy full screen window is
created so subsequent windows have correct size.

Change-Id: Id8bd0212b6eca677953e78505459e3cd69bc6328
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Fix xcb plugin backing store byte order issue

The image format of the backing store should use the byte order of the
machine where the application is running, not the native format of the
X server. Then, if the byte order of the backing store image differs
from the X server's native format, it needs to be converted before
being sent across the network.

Task-number: QTBUG-29898
Change-Id: Ic91c8ffb814c6beeb9f1d9195174a47d8bd94a90
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
QTestCase: fix macros taking expressions to avoid clang warnings

They were of the form "warning: using the result of an assignment
as a condition without parentheses [-Wparentheses]"

Change-Id: I049bf0f67073bf41310ca5ee73f17e5e69de569f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Ensure we initialize things before checking the openssl version.

Task-number: QTBUG-37783
Change-Id: Ie276e597062d8bfc74ef57251ed21a94020e030f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Prevent QUnifiedTimer from ticking backwards.

This could happen in the following situation:
* a custom animation driver with fixed delta
* a triple-buffering scheme (rendering ahead a frame)
* a second animation timer starting while a first was active

This would cause QUnifiedTimer::startTimers() to trigger
QUnifiedTimer::updateAnimationTimers(-1), and use the current time from
the QElapsedTimer rather than the animation driver. This time could be
less than the last reported time from the animation driver.

Change-Id: Ibf1796fcb99f288d4946b30e5e7225695aa61781
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Don't access null pointer

Change-Id: If9ac712543f7c7fd85d877bba76e67ce89c60c61
Reviewed-by: Michael Brasser <michael.brasser@live.com>