Backport qmlRegisterUncreatableType with version template

Otherwise it is not possible to extend or add uncreatable types safely.

Change-Id: I22e81bb46a69efcec3522454d5ad465099b2555b
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
BlackBerry: Revised error handling in event dispatcher

Added an upper bound check for socket notifier file descriptors. Too
high FDs have been a real source of failure.
Added compiler hints to allow error-free code path run faster (errors
are highly unlikely) and adjusted warning messages (some were misleading
and too long).
Backported from qtbase: ebd5de1

Change-Id: Ib982f853ee803447bdcaf22aed310697a36b4ccf
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Widgets: avoid integer divide by zero in QProgressDialog

Autotest is included.

Task-number: QTBUG-31046

Change-Id: Ief7d71b58e7a5416f3659f19445e5d729849b3b6
(cherry picked from commit 69c05bbef47fb9d30d70e594bd5942add8b135fe)
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
test: Mark tst_qinputdialog as insignificant only on Mac OS X

This test has been passing lately for Linux and Windows.

Task-number: QTBUG-31101
Change-Id: Iccb8169dc513df7c0c34cd15d21d11e59cb44f11
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Prevent crash due to giving QWidget::update() a large rect.

We can simply clip the update rect against the widget's rect and return
if it's empty. Otherwise we risk ending up with update rects that are
larger than INT_MAX due to multiple update rects being merged.

Task-number: QTBUG-30876
Change-Id: I23bd0149fbe8d1a007a60b228e6bddb45dc4fc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
(cherry picked from commit a298216bb4383dbe96688dfb80da0cd875766de0)
Prevent crash due to giving QWidget::update() a large region.

Similar to what change a298216bb4383dbe96 does for update(QRect) we clip
the update region against the widget's rect and return if it's empty.
Otherwise we risk ending up with update rects that are larger than
INT_MAX due to multiple update rects being merged.

Task-number: QTBUG-30876
Change-Id: Idf695b1fdca50449a1e5ddf37500653de290590c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
(cherry picked from commit 69ee30260a667b2b977a0d4b52abf6537521cce8)