Fix CreateFileMapping() error handling

CreateFileMapping() returns NULL in case of an error.
The patch corrects the wrong testing on INVALID_HANDLE_VALUE, and sets
NULL for invalid handles.

Change-Id: Iaab4945ed88ee92bbf9a0871e95a5820dd1a56ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
PSQL: lastInsertId without OID on table

Make lastInsertID work for tables without OIDs.
The use of OID in tables is now deprecated in PostgeSQL and
lastval() is now provided.

http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.html#GUC-DEFAULT-WITH-OIDS

Change-Id: I01dfdd7a2aab8826487657f691fea3c9268c16b2
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
qcocamenubar: force update after destructor

Task-number: QTCREATORBUG-8785
Change-Id: I1e782cab36f4fea331561f016ea67a73deb63c37
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Fix automatic hiding/restoring of transient children.

Task-number: QTBUG-28408

Change-Id: I31382c4edc213961dfb132af3bf5202e178e7a57
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix QCommonStyle::drawControl(CE_ShapedFrame) for QFrame::H/VLine

Respect QStyleOption::rect, do not expect Y to be 0.

Task-number: QTBUG-29926
Change-Id: I6304d20f629f89774c897d2c81c2c7816dff4718
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I6b49d5e1c31599b5aa4940b798533b17e58616bf
EGLFS: Enablers for Android plugin

These are some changes that are needed to make the Android
plugin as a subclass of the EGLFS plugin.

Change-Id: I7c77931f311d8a07f9292715d2abc256c5d552d8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Allow flushing window system events from other thread

For platform plugins such as the Android plugin, we need to
make sure an event is delivered and handled before continuing
execution (e.g. when doing an expose event to report that the
EGL surface has been destroyed when the app goes into the
background.)

Change-Id: Ibd381baafa93f111dbc887d4cf9d9ca37429b186
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
OpenGL: Reinstate support for OpenGL geometry shaders

Unlike QGLShader, this requires the OpenGL 3.2 core implementation
of geometry shaders to keep the API simple.

Change-Id: Icb07f430c4c5b5d950bcf6f7119becec4cfaad8a
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
OpenGL: Add QOpenGLVertexArrayObject class

This class makes it much simpler to manage OpenGL state relating to
vertex data (i.e. vertex buffer objects, vertex attribute divisors,
index buffer objects, vertex buffer formats).

Change-Id: I9fb932cc3f0691ec9ba065bf871e43cd2e369bad
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Doc: Various changes to global CSS files.

-added style for JavaScript code blocks
-code blocks is scrollable when viewed in a narrow window
-improved alignment of table of contents

Change-Id: I45acdb4c7aa0ae57fe030e7e68a230c1a7d41b8f
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
QNX: QQnxCursor implementation.

Implementation of QQnxCursor, a QPlatformCursor subclass. Due to the lack of a
proper cursor API from the underlying OS, this class only caches the current
cursor position to make sure that the QCursor class works properly.

This is a backport of 290ed7f8fafd67197f773454223410bbe57fc4d3.
At the time there weren't any known bugs regarding this, so it was committed
to "dev" branch as a feature.

Now we needed it in "stable", otherwise menus don't work correctly, due to
QCursor::pos() being bogus.

Change-Id: I5a4217c92a0aaed0b22b45ca3c4e0fad882e810f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Don't look up DOCTYPE when resolving SDK settings on Mac OS

We don't want to hit the network, as a flakey network or slow server will
hang the XML parsing. We assume the XML is well formed.

Change-Id: Idc4898a925a46222954bf633a04ea9fe148c6797
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add private API to connect to slots in QObjectPrivate

Change-Id: I16ffbf91ff4c6e9fca6fe7984800d2c24e70701b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
BlackBerry: handle window state navigator events

Change-Id: I925b1c53c5e251111469501056ee162a23e36faf
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Merge "Merge branch 'ios' into dev" into refs/staging/dev
doc: remove link to obsolete doc

Change-Id: Ie1a48a821764978a28e274c7eb52ee02aef391a6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Fixed -dbus-linked when cross-compiling from Windows

Since Windows doesn't have pkg-config, it doesn't get -ldbus-1
added to the command line automatically like Linux does.  Code
was present to deal with this case, however it was only configured
to work when native-compiling Qt.  The flag was not added when
cross-compiling, meaning that -dbus-linked did not work correctly
in that case.  This patch changes the code to add the flag properly
in both cases.

Change-Id: I67881643bd658161f4929f3932859ccf636ca7a9
Task-number: QTBUG-29984
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add the infrastructure to compile Qt with -Werror

This is enabled only for -developer-builds and only for certain
compiler-version combinations that are in a whitelist.

It also requires each library, plugin or tool to declare whether it is
supposedly clean of warnings. When most targets are clean, we can
consider inverting.

Change-Id: I17b5c4e45aee5078f9788e846a45d619c144095a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix Q_GLOBAL_STATIC support for exceptions

The problem was that the HolderBase destructor was getting called after
the contained type's constructor threw an exception, as is required by
RAII semantics (the base was fully initialized, so it had to be
destroyed). That was required because we want to return a non-null
pointer from operator() during destruction and return null after
destruction, to keep compatibility with Qt 4.

The solution is to only set the guard to Destroyed only if it is already
at value Initialized. This way, if the HolderBase destructor is run as
part of the stack unwinding, it knows that the construction did not
complete.

Change-Id: I9849b43ed7112bf9e70861b48a56a924c286617e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>