Autotest: Fix QDateTime failure if the test got run West of Greenwich

There was a comment about the test failing for max() because of an
overflow. That happens if you're at UTC or ahead of it (to the East of
the Prime Meridian), which is how this test usually gets run (UTC,
Europe/Oslo, Europe/Helsinki, Pacific/Auckland). But if you're behind
UTC (to the West of the Prime Meridian), then the overflow happens for
min().

Change-Id: Iebba49d1303e9f18f5038f5cf23c77bf83e5fd4b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Fix file descriptor leak in the perf event counter

We opened the counter at every start(), even if we had already started
before. Some of the benchlib's options caused it to start() and stop()
over and over again, like -minimumvalue and -minimumtotal, which could
leak to fd exhaustion (EMFILE).

Change-Id: Ifeb7cca65c758877be600dc22928bea74f499934
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Fix function-not-used warnings detected by Clang 3.4

These functions have been turned to static (although inline), which
means they need to be used or marked as possibly unused.

qglobal.h:712:37: error: unused function 'qFuzzyCompare' [-Werror,-Wunused-function]

Change-Id: Ie2ee713d26c86e0574b579c1ea42b9404c3d2035
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix unused function warnings in qtriangulator.cpp

qIntersectionPoint with ints wasn't used, qDot was only used in debug
mode. Found by Clang 3.4.

Change-Id: I4b5699f75eb88331df54bf5a289133914d80b299
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Remove unused member m_eglApi

It's not used anywhere. Found by Clang 3.4:

qeglplatformcontext_p.h:80:13: error: private field 'm_eglApi' is not used [-Werror,-Wunused-private-field]

Change-Id: I37ce240a9d07ef570e0814de366dbb7cd13ad714
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Fix QtWidget function-unused warnings found by Clang 3.4

qwidgetbackingstore.cpp:72:20: error: unused function 'qRectIntersects' [-Werror,-Wunused-function]

Change-Id: Ia3afe8f0547fa86804093281db89efabe68b34a1
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Don't check if a file exists before opening it

If the file doesn't exist, open() will fail. But open() might fail
even if the file exists(), which would lead to bad follow-up code. In
any case, this saves one unnecessary stat(2).

Change-Id: Ic99507c9dc07a4387ee6a4fe9c24830fca54e095
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Make qtbase compile with QT_NO_XMLSTREAMWRITER

Change-Id: I6d2447ba0875117e8a50d1aa3133bd5ea098d51a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix bug on X11 with WA_TranslucentBackground and native child windows.

The native child windows need to inherit the parent's visual in order
to have a translucent background as well.

Surface with type QSurface::OpenGLSurface should not be forced to use
the parent window's visual - the parent visual for instance, might not
even be GL capable.

Changing WA_TranslucentBackground during runtime is not supported, for
two reasons:

1) Other platform plugins seem not to support it
2) It would require recreating X windows.

Task-number: QTBUG-29625

Change-Id: Ic1474dd2de99069027481c7db6bf865f9b8d616d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
fix memory leaks in MSVC generators

Change-Id: I11bfc8259ac4e175c9ecc37d64f1d2e5037f15aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Remove #ifdef from outside test functions

It's usually a bad idea to surround slots or signals with #ifdef since
moc may not parse it the same way the compiler does.

Change-Id: I6a3623ed7cb9fbc1b966df9d60f71b7fdf91acfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Use custom -I,-D and -L flags when building arch-test

Needed for using alternate stdlib implementation like libc++ with clang.

Change-Id: I1782f62f5e2ea95e6cff8a1ed646362c0a31645c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Make qtbase compile with QT_NO_DOM

Change-Id: I98bef84ca9bf86bf7dddd3ca2a3d8210a8e46a16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
network proxy tests: adapt proxy authentication to new server

The tests pass with the new test server image. Once we are using the
new test server we can remove the test for the host not found error.

Change-Id: Iac8ba6d8ce31b0865b33a003086aac0339afe338
Reviewed-by: Richard J. Moore <rich@kde.org>
Don't force create the platform window.

This causes all sorts of unintended side effects and
is generally a bad idea.

Task-number: QTBUG-32988
Change-Id: Iebdae34764be4cfd9ced47aa93789871e0455ab3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Make qtbase compile with QT_NO_GESTURES

Change-Id: I90f173265e177ff37ce80da3983080651856259d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Make qtbase compile with QT_NO_TEMPORARYFILE

Change-Id: I0211ed44513723392e3f50b76be10b95c0bcddd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>