Fix invalid memory read when shutting down QML applications

As the last line in the QObject destructor, we call setParentHelper(0) to
remove ourselves from the parent. In the process of that we also initiate the
QML parentChanged callback. The first thing that parentChanged callback used to
do (but now does it too late, after 26350b5ceafa0ade1328037f6234a7d288eb8f48 in
qtdeclarative) is to check if the object was deleted and then return. We could
re-introduce the check there, but I think it's cleaner to not bother calling
the callback on a dead object in the first place.

Change-Id: Ia4d43b65a9b3744a451b4c312a2d6f9c0e3b67dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Update ChangeLog for 5.2.0 [QtWidgets II]

Second batch of changes.

Change-Id: I5b3add1df19bcad195f8b9286337de9fe926337c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
iOS: Forward [UIApplicationDelegate handleOpenURL:] to QDesktopServices

The user may use QDesktopServices::setUrlHandler() in combination with
the appropriate Info.plist keys (CFBundleURLTypes, CFBundleURLSchemes)
to react to URL requests from other applications.

This is among other things useful for handling OAuth authentication from
applications such as Dropbox. See:

  https://www.dropbox.com/developers/core/start/ios

We protect against recursive URL opening, but an application may still
redirect a request to open a URL by opening another URL, eg a website.

Task-number: QTBUG-35201
Change-Id: I9f1d246206c5594b1b65bb11fa98c6bcdefc443e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Update screen properties when we trigger statusbar changes on iOS7

Ideally we'd have a callback from iOS when this happens, so we can also
react to changes done outside of Qt, but willChangeStatusBarFrame and
friends do not seem to give us what we want.

Change-Id: I686ce7950395a83c4257372363c773a95c3935ed
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Provide default launch image for 4-inch devices

Otherwise the application will not scale to the full resolution of
the device. We copy the image into the Xcode project, since it's
internal to our build system and not meant as a template to be
edited by the user.

For 5.3 we need to provide a proper qmake/qbs mechanism to handle
launch images.

Task-number: QTBUG-31431
Change-Id: Ied0b2843a78c5ea865750e0404418ced7ad27082
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Add a few notes to changes-5.2.0

Mostly changes for Android. One change in Qt Gui.

Change-Id: Ifce627b6688702b3a3ae1634bd344eb8331f6caf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Doc: corrected invalid ref. to output iterators

Task-number: QTBUG-34749
Change-Id: I7abd504b6081e84a8e67c7957e13d402999e9d38
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Docs: add important QWheelEvent::phase() related notes

Change-Id: I4901b96b44b7c1179e678689af5962cb4570d50d
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I2e2bf789b0fe8442ed623bc0c8aef591235cdabe
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
QPrinter - Fix OutputFormat when no printers

Currently the QPrinter constructor, setOutputFormat() and
setPrinterName() make bad assumptions about the availability of printers
when configuring NativeFormat which can lead to inconsistent print
engine set-ups leading to crashes in the print dialog, especially on
Windows where a valid DEVMODE is needed.

This change cleans up the init and methods to ensure NativeFormat can
only ever be set if we have both a valid plugin and a valid printer,
if not the PdfFormat is used.  One side-effect of this is that it is
now impossible to set an invalid printer name via QPrinter (but still
able to be done via QPrintEngine if really needed).  Also if no
default printer is set then use the first available one.

This also fixes a bug where setting a new printer name on Windows
reset all the saved settings.

[ChangeLog][Important Behavior Changes] QPrinter no longer allows you
to set an invalid printer name.

Task-number: QTBUG-34345
Task-number: QTBUG-26008
Task-number: QTBUG-26430
Change-Id: I19737e4209d8c8df5817ea83246b3dd0c483ee85
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QPrinter - Simplify setting manual properties

Change from a list to a set and define a utility method to both set the
property and store that we have set it.

Change-Id: I0cf13f1b0e90942424744316d0d3f699b9ead144
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
qdbusxml2cpp: Use the mtime on the input XML to avoid needless source changes.

These can cause rebuilds unnecessarily when repeatedly running qdbusxml2cpp.

Change-Id: I902954d4bed6fe68802183e51d82700fe30af437
Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
BlackBerry: Fix QFileDialog show()/hide()

QFileDialog::show() no longer worked after the dialog had already been shown
and hidden before.

Task-number: QTBUG-34983
Change-Id: I7300374b74805308e0966db7b3545e5fd8470465
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
BlackBerry: remove unused variable

m_result is not used by qqnxfiledialoghelper_bb10.cpp, only by its playbook
counterpart.

Change-Id: I4fae924283560703393c5313527c5c9c2005d35b
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
BlackBerry: properly clean up QFileDialog files

Task-number: QTBUG-34983

Change-Id: I1af5c6a9c43eba77394b11d31d1d223af8bc221f
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Detect posix_fallocate at configure time

Testing feature macros is not enough for uclibc. Fixes build of the built-in
sqlite3 with uclibc <= 0.9.33.2. Later versions will have posix_fallocate().

Change-Id: I918a52777ac63624635802221effc6b86fa2269c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Fix evaluation of SQLite driver options

Ensure that the options, which are passed to the SQLite driver, are
evaluated in the correct order and do not overwrite each other.
According to http://www.sqlite.org/c3ref/open.html the
SQLITE_OPEN_READONLY and (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) are
mutual exclusive, but SQLITE_OPEN_URI can be combined with both of them.

Task-number: QTBUG-35186
[ChangeLog][QtSql][QSQLITE] Fixed evaluation of driver options
Change-Id: I8e74fe1ce43b9118b15f7b13fc71670bdcd73f68
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Fix compilation of OCI driver

Add missing feature enum in switch statement to
avoid warning that would lead to compilation error
when compiled with -Wall.

Task-number: QTBUG-34794
Change-Id: Ia2f70f27ecbb7a7dfc9d36d261103ff49b6c5e4b
[ChangeLog][QtSql][QOCI] Fix compilation
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Support custom port number in IBASE SQL driver

Let the IBASE SQL driver use the custom port number
that is set via QSqlDatabase::setPort().

Task-number: QTBUG-33345
Change-Id: Ib55b32c8a318d82038d66e8645b416e36dad3edf
[ChangeLog][QtSql][QIBASE] Support custom port number
Reviewed-by: Mark Brand <mabrand@mabrand.nl>