Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
	src/gui/kernel/qguiapplication.cpp
	src/plugins/platforms/android/androidjnimain.cpp
	src/plugins/platforms/android/qandroidplatformintegration.cpp
	src/plugins/platforms/android/qandroidplatformintegration.h
	src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/sql/doc/src/sql-driver.qdoc
	src/widgets/widgets/qtoolbararealayout.cpp

Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
qmake: Provide feature for windeployqt

windeployqt is a tool that aids in the deployment of Qt libraries and
other files on Windows. This feature (CONFIG+=windeployqt) adds
automatic invocation of windeployqt for qmake projects as a post-link
action. For Visual Studio projects, windeployqt is added as a custom
target which runs after linking, automatically adding the output as
deployment items.

Task-number: QTBUG-35630

Change-Id: I4cdcb1a7f70cedccb4a4e17be5eb9f5de35a4d66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
kms: Adapt to initialize() pattern

Right now socket notifiers are attempted to be created before having
the event dispatcher up. This is wrong.

Change-Id: Ica3034b9fa790c037f28982db23c71342f6597d7
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
SSL: add support for the Next Protocol Negotiation extension

... which is needed to negotiate the SPDY protocol.

[ChangeLog][QtNetwork][QSslConfiguration] Added support for the Next
Protocol Negotiation (NPN) TLS extension.

Task-number: QTBUG-33208

Change-Id: I3c945f9b7e2d2ffb0814bfdd3e87de1dae6c20ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Enable categorized logging for bootstrapped tools

Change-Id: Ie908a175bda103fd8d73031024a823a4c4d3dbb7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Promote the scrollbar style animation to qstyleanimation_p.h

Makes it possible for QFusionStyle to utilize the same animation.

Change-Id: Ifac9eaa3138cf1068439d5b0271a2acce54a3c16
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
WinRT qmake vcproj: Fix icon locator

This was broken for shadow builds. Adding the output directory to the
manifest file name fixes the problem.

Change-Id: I9e5b47a08f80f7afcfd76e13784fbaec912e50ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Widgets: update widget transform upon receiving QEvent::FocusIn

QWidgetPrivate::updateWidgetTransform will only update the
transform if the widget is the current focus object.
But if someone calls QApplication::setActiveWindow, Qt will
call QWindow::requestActivate and then send focus
in/out events, all in the same event loop recursion.

The problem now is that requestActivate is not guaranteed to be
synchronous (it's not on iOS). So the window activation
(together with updating the focus object) will still be pending
when the widget receives the focus-in event. As such, the
transform update will also fail.

This patch will give the event as input to the function, so
that we don't depend on window activation being synchronous.

This will fix IM spell checking popups on iOS to show at the
correct place, also after closing font popups etc.

Change-Id: If0ee70f55692bbd613821b126923364e39ed1199
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix build with QT_NO_GRAPHICSVIEW

Change-Id: I81cfed124a2e9e1c46c966c4819e89df5abd4f74
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Fix warning with QT_NO_GRAPHICSVIEW

Change-Id: I96064f0db359fbf5c615e48633398b79872e0bc5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Allow configuration of logging rules from file system

Allow configuration of logging rules from outside of the application,
either through a configuration file (.config/QtProject/qtlogging.ini),
or through a file specified by a QT_LOGGING_CONF environment
variable.

The logging rules from the different sources are concatenated: First
the rules from QtProject/qtlogging.ini are applied, then
QLoggingCategory::setLoggingRules(), finally from the environment.
This allows an application to overwrite/augment the system wide rules,
and in turn that can be tailored for a specific run by setting a
configuration in the environment variable.

[ChangeLog][QtCore][Logging] The logging framework can now be configured
with an .ini file.

Change-Id: I442efde1b7e0a2ebe135c6f6e0a4b656483fe4b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Configure: Disable widgets module too if gui module is disabled

Use the same logic as in the Unix configure script, and disable
"widgets" if "gui" is disabled.

Change-Id: Ica338ad10b965eea297dddaaedeea61a3ae3ebe9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Windows: Restore maximized/full screen widgets to correct screen.

Partially revert 54865d47cfd859a0e84ba8e1bbff3b56c93d4e0d and
bring back parts from abba37cd0eff959edf2d011842cbf2b36cce8467 which
failed some tests on other platforms and never made it in.

Avoid setting a geometry on maximized windows since that leaves
them in a broken state. Instead, if there is a need to restore
maximized windows to a different screen, clear the maximized flag
before applying the geometry.

[ChangeLog][QWidget][Windows] QWidget::restoreGeometry() now restores
maximized/full screen widgets to the correct screen.

Task-number: QTBUG-21371
Task-number: QTBUG-4397

Change-Id: Ibd5b736e921f20d4b7365c06c6f9c5dd4469c781
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Windows: Fix potential crash in font database when family name is empty.

Task-number: QTBUG-36651

Change-Id: Icd3edc7dbed3e692b32374b0ab6251e7f939589d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Implement native message box for WinRT

Added a basic theme class, which creates accessors for the
QPlatformMessageDialogHelper. This handles creation of the
native dialog, but also spawning an event loop around it.

There are some limitations shared with the Android implementation.
First you cannot create custom labelled buttons and also selecting
the default button is not possible. This will be added at a later
point.

Note that Windows Phone is not supported.

Change-Id: I2dec83dcded7919835a6dcdf8dc2a56282024a7e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Fix build with QT_NO_GRAPHICSEFFECT

Change-Id: Iadc78c270f541067dbbebcf77748077cc3a8be13
OSX: Fix build with QT_NO_OPENGL

Task-number: QTBUG-31151

Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04