Fix crash when trying to place toolbar into zero-height window.

Change QToolBarAreaLayout::item() to return a pointer
and check return values in plug().

Task-number: QTBUG-37183
Change-Id: I7029eb9739cbe603460e87d3e5493f116bdb3a89
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
(cherry picked from qtbase/e38ad9455099a83e2a8619f19ca949bc64ae6f82)
Fix crash when deleting top level windows embedded into QGraphicsProxyWidget.

Clear proxyWidget pointer in slot
QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot().

Task-number: QTBUG-29684
Task-number: QTBUG-33213
Change-Id: Ibdbd52aa810ca908e3d98daa00954345e7a93a48
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
(cherry picked from qtbase/ff2dbe609ef4482d66d1ecd135b4f53f6aff7e60)
Improve handling of temporary directories in SQL tests.

Initialize directory delayed in shared code and add checks to verify
that it is valid. Close attached / cloned databases to prevent locks
on files and leaking temporary directories caused by SQLite:

QTemporaryDir: Unable to remove "...\Temp\tst_qsqldatabase-P1XkOA" most likely due to the presence of read-only files.
QTemporaryDir: Unable to remove "...\Temp\tst_qsqltablemodel-P1XkOA" most likely due to the presence of read-only files.
QWARN  : tst_QSql::concurrentAccess() QTemporaryDir: Unable to remove "...\Temp\tst_qsql-l0VAKJ" most likely due to the presence of read-only files.

In Qt 4, emulate the temporary directory by maintaining
a list of files and deleting them in reverse order.

Change-Id: If85bbaed04bb1a32e427d642be332996d967f796
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/9a4beb4d36dc0c613e59aa5d88060d521462f56c)
increase timeouts to make tst_macgui autotest more stable

Task-number: QTBUG-20984
Task-number: QTBUG-26372
Change-Id: I03e31e0e8c6428767cca91a8be6778ed08a2d783
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
OS X: Make Qt application react on applicationShouldHandleReopen

Currently a click on e.g. the dock icon is not propagated to the
application so if for example the main widget is hidden, it doesn't come
back. This patch fixes it

Task-number: QTBUG-10899

[ChangeLog][QtGui][OS X] Fixes a bug where clicking on the dock icon
would not be propagated to the application

Change-Id: Ia02ca23ed0dafbd337d1d7d9bc5f7efe3843b512
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fix compilation of QtWebKit with MSVC 2012/2013

For some reason, MSVC 2012/2013 is no longer able to infer the
need for both a call to a constructor and a cast of its parameter
so we have to give a hint for at least one of these two operations.

Task-number: QTBUG-31882
Change-Id: I42b54313ec4f6a83cde28326534c59b93ab3f615
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix compilation of QtWebKit with MSVC 2013

Starting with MSVC 2013, more functions are provided.

Task-number: QTBUG-34705
Change-Id: I85e35a2486e0bd556f5f16e5911cca5c364273ed
(adapted from commit qtscript/24d678ce9c3996f46d1069c2b1193e7ec1083fc8)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>