Android: Add commercial license to BSD-licensed files

These files should also be usable under the commercial license
terms as an alternative to the BSD license.

Change-Id: If211bb63789722f655843831073ed05ee69811ea
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Revert "Propagate synthesized mouse events in parallel (lock-step) with touch"

This reverts commit 7808ec795c5831d56dae9c4f9f7e1306489864aa.

The commit interferes with the mouse event synthesizing which
was introduced in e50416066cab4be7df8382bd224d9e4ddd7a903a, and
which claims to solve the same original problem: Synthesizing mouse
events should be moved out from the platform plugin.

The issue with 7808ec795c5831d56dae9c4f9f7e1306489864aa is that
mouse events which are stolen by event filters will never get
composed double click events (this is done in the QGuiApplication
code), so double clicking on item views does not work with
synthesized mouse events. This makes e.g.directory pickers
unusable on a touch display.

The test cases introduced in the original patch still pass.

Task-number: QTBUG-36974
Change-Id: I0ec7c65d2a77589e60408623c2c0b20d427f0cfa
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Disable 'gsub' table check for AAT fonts on Mac

In AAT fonts, 'gsub' table is effectively replaced by 'mort'/'morx' table.

Change-Id: Ifa044c8e28c3f2aab0f57ba5e3e6b99ada84d37c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Doc: fix documentation for QGraphicsScene::focusItemChanged()

The name was misspelled in \fn.

Change-Id: I09824b72423b116612ee6e1069793de95d76f883
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Doc: fix warning: No documentation for 'QApplication::palette()'

Hide the forwarder function from QDoc.

Change-Id: I2ea5cce0e68a5803cd4a24cefbbd50fc6c5ffb94
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Remove use of templates in tst_qatomicinteger.

MSVC 2008 is confused by TypeInStruct being a template, resulting in

\tst_qatomicinteger.cpp(189) : error C2027: use of undefined type 'QStaticAssertFailure<Test>'
        with
        [
            Test=false
        ]

for int (and thus for all unsupported types). This appears to be a real
Heisenbug-nature compiler bug as it can also be fixed by adding
qDebug() << Q_ALIGNOF(TypeInStruct<T>)
before the static assert.

Task-number: QTBUG-37195

Change-Id: Ib2b60f3c1ffeb0b8bdeb1fb0c659655ce4ab10d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Support QQuickWidget on Windows.

Task-number: QTBUG-36887

Change-Id: Ifb03804e21fd82d7eae2942b9e8ca83f1bdb776c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
xcb: Rename main.cpp to xcbmain.cpp

Files with same base name cause extra trouble for debuggers.
It can be avoided here.

Change-Id: I1b7a6f28ac41bacbfd2603feb8b786c31d3769e3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix issue where revealed widget children do not receive paint event.

When a child of a widget is spontaneously revealed due to a call to
the parent 'resize' method, the child will not receive a paint event
if it has the WA_StaticContents and WA_OpaquePaintEvent flags set.

This is caused by the backing store being pre-emptively resized by the
call to setGeometry_sys, which causes QWidgetBackingStore::sync to skip
the block which handles the static contents.

There doesn't appear to be any reason to preemptively resize the backing
store, since it is always resized as-needed during the the 'sync' method.
This change-set removes the code which preemptively resizes the backing
store.

Task-number: QTBUG-35282
Change-Id: Ie9942854ca5322dfe0f98ed8100810161576be80
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fix QDateEdit popup appearance on mac

The WS/OS was obviously incorrect and the hack seems not to be
needed any more.

[ChangeLog][QtWidgets][Mac] Fixed incorrect appearance
of QDateEdit with calendarPopup enabled.

Task-number: QTBUG-36692
Change-Id: Ic62c9993dc13e783c00fcb56f75d92967eb5074d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QTouchDevice Documentation grammar correction.

Change-Id: I3b378f1c3df7210029cf82208c23b67b75c47021
Signed-off-by: David Fries <David@Fries.net>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
iOS: prevent crash on iOS 5

For some reason, the [] access into NSDictionary causes
a crash on iOS 5. So instead use the API as listed in
the documentation: objectForKey.

Task-number: QTBUG-36532
Change-Id: I19fdf0f4ba1aebaf9477e2bd45040c389923605d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Vista Style: Fix menu item checkmark offset for QQuick Controls

Change-Id: I8d4a8f0d3a079a5569f9442f8d6d523f05daca60
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fix crash in QSimpleDrag if drag wasn't started over a QWindow

The code in QSimpleDrag::startDrag() checks for the validity of the
current window before passing it on to QWindowSystemInterface::handleDrag(),
and so should QSimpleDrag::cancel().

Change-Id: I2228d86ede2a0b8379a55000a5c1d830cab44d45
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Doc: Clarify QJsonValue::fromVariant() type conversions

It wasn't obvious before that many QMetaType types get converted to the
same QJsonValue type.

Change-Id: I7bb02cb10b6c8a873e291cdf1e16c6c821d51208
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Doc: Mention that QSortFilterProxyModel::lessThan() handles floats

Change-Id: Iaf97d22fad3724d1910b18b6d38a06eae4c909ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Remove duplicated tests

tst_QtJson::testValueSimple() tested bool and double values twice

Change-Id: Ie6e58aab729c6ee20cb53d3b85746a05f7571f5e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Dynamic GL: remove exporting symbols

Remove the opengl proxy for now. Later it will either be moved into
a separate library or replaced by a QOpenGLFunctions-based approach.

This means that the -opengl dynamic configuration is not usable
for the time being. The rest of the enablers remain in place.

The convenience function QOpenGLFunctions::isES() is now moved to
QOpenGLContext and is changed to check the renderable type. This is
extremely useful since besides supporting dynamic GL it solves also
the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES
path when creating an ES-compatible context with a desktop OpenGL
implementation).

Task-number: QTBUG-36483
Task-number: QTBUG-37172
Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Revert path() behavior to not expand a current path on a drive

In the original change - cfb44c6528b2518274bf157388832d1d610ce0e4 - when
querying for the path of a file that did not contain a slash after the
drive indicator it would get the current path and return that as the path
that the file resided on.

However this meant that it would take the current path at that time which
may not be the actual path that was expected. So it was decided that
it should revert back to the original behavior which was to just return
the drive letter followed by the colon which would thus indicate still
that it represented whatever the current path was on that drive.

Change-Id: Ic57ae9227882a66e9a4c4d6537d7f2cae829165a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Don't assume a QBasicDrag will start and end over a QWindow

A QBasicDrag is started from QBasicDrag::drag() through the drag manager,
which may happen from e.g a widget. The event filter needs to look at
events to more than just QWindows, otherwise the filter will miss eg.
mouse release events that are sent to QWidget and not to the QWindow
handle, and the drag goes on forever, causing invalid internal state
when a new drag is then started.

Change-Id: I5cee250e2c7552817bda0895d4c5794e12d26592
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>