Cocoa: Don't send duplicate close events.

Don't send QCloseEvents to QWidgetWindows during
cmd-q application shutdown, since widgets will
will already have received close events from
QApplication close event handling.

Task-number: QTBUG-39398
Change-Id: I7f6e892b0042361bed7a3bc5fac8518eabfc8e4e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
qdoc: Revised logic for which example file to open in Qt Creator

qdoc stores the 'files to open' into the example manifest. These
files are opened in Qt Creator's editor when an example is selected
from the Welcome / Examples list.

This change uses the following criteria (case insensitive), in
order of preference:
    - .qml file matching the project name
    - .cpp file matching the project name
    - .h file matching the project name
    - main.qml
    - main.cpp

A 'mainFile = "true"' argument is written for the file that is
preferred to be the top-most file.

Having a main.qml file take precedence over main.cpp ensures that
most Qt Quick examples open into the relevant QML code instead of
the boilerplate C++ used for launching the application.

Task-number: QTBUG-37203
Change-Id: I2ea58a31b1284f4f7d424dd35d49a84a23a88c23
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Fix failing qtdeclarativetextedit auto-test

After commit c3baa7c1dc8c29bfe60e8e5c676c606d4f699005 the qtdeclarativetextedit
tests in the qtquick1 module started failing. This was due to commit
852abfca6f4c349dce9b895956922f96d82df579 from 4.8 not being forward-ported from
Qt 4 to Qt 5, hence the comment in c3baa7c1dc8c29bfe60e8e5c676c606d4f699005
about the missing mousePressEvent line. It was intentionally removed and
instead used further down, which is what this patch adds and therefore acts as
forward-port of 852abfca6f4c349dce9b895956922f96d82df579.

Change-Id: I55978c961002382c1f228bf796c469c10686ba9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Make sure we run gracefully below API level 18

Task-number: QTBUG-39508
Change-Id: I023ba7c50de5c95a5514658797125e22016a6543
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Fix QT_NO_LIBRARY compile in Unix DNS lookup implementation.

The static method QDnsLookupRunnable::query() got an additional parameter for QTBUG-30166, but the #ifdef'd part was not updated.

Change-Id: Ifc317bfae6e02c00936e1922ec77f89fb5faf497
Reviewed-by: Richard J. Moore <rich@kde.org>
Fix QT_NO_BEARERMANAGEMENT compile of QHttpThreadDelegate.

Re-order the constructor parameters for QHttpNetworkConnection to be consistent with the #ifndef version.

Change-Id: Icd8be4406ff549d468e06d635fac2ddc34826b1c
Reviewed-by: Richard J. Moore <rich@kde.org>
Fix QT_NO_SETTINGS build in QLibraryInfo.

One reference to QSettings was only guarded by QT_BOOTSTRAPPED.

Change-Id: I2f9761ee88b4a45edb16054fdba3c3f11fec12ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>