Work around msvc /clr LNK2005 errors with QList

This patch fixes a compatibility with Qt 5 and Microsoft C++ /clr mode.
The QList copy constructor defines a Cleanup class that causes LNK2005
errors. It is a compiler problem, but the patch is simple. The use of
QT_TRY/QT_RETHROW instead of a Cleanup class is more consistent with other
Qt code, so is arguably preferable even without the compiler bug.

Task-number: QTBUG-31949

Change-Id: I1acfbae1924f0a52ffb8d9722b52e01b61edd42e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove a left over cast that is now semantically incorrect.

CFPropertyListRef is a typedef for void*, which is why this code was
compiling OK prior to this change.

Change-Id: I78d65652a76721434056bd9f6d011917e2864125
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add support for Q_OS_FREEBSD_KERNEL and document

Also clarify documentation for OSes with variants. Q_OS_ANDROID should
have been called Q_OS_LINUX_ANDROID and Q_OS_BLACKBERRY should have been
Q_OS_QNX_BLACKBERRY.

Task-number: QTBUG-15402
Change-Id: I3a34d52a1c0ebb8eb73284bdf198443c209a5fd4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Symbol for max number of arguments in QMetaMethod::invoke()

QMetaMethod::invoke(..) takes fixed number of arguments for execution.
Adding preprocessor macros which literaly equals this number would be
useful for writing some generic code.

Task-number: QTBUG-31821
Change-Id: Ia2faf291f3f7df44a47c3cf18f5cd587d37d7d2e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix crash on qdbus when return type is a raw dbus type

Assigning a -1 to type is going to make things crash since
it basically means unresolved and when you try to access the string data
go to a index that doesn't exist

So what I do is save the return type in rawReturnType if it is a raw
one and reassign the type to IsUnresolvedType | strings.enter(mm.rawReturnType)
instead of -1 when "saving" the metaobject

Task-number: QTBUG-32671

Change-Id: I67898dea8a1926eee80c16417e877ef4e22aa06b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Cocoa: Make sure that resizeEvent is invoked after calling resize

The QWindow::resizeEvent documentation states that resizeEvent
is invoked after the windowing system has acknowledged a
setGeometry() or resize() request.

The Cocoa plugin however did set the platform window geometry
immediately so that the qnsview's updateGeometry returned too
early.

Task-number: QTBUG-32706
Change-Id: I1f359ab368833d174ab6740f4467b0848c290f13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fix upload of glyphs when using RGB32 masks on OpenGL ES

OpenGL ES doesn't allow internal format to be different
from external format, so always do the conversion from
BGRA -> RGBA. We are anyway iterating over all the
pixels so the performance impact of this should be
minimal.

Change-Id: Ie891665ad66e31692b69db02d34be8d303a7d631
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
QByteArray: Remove some reinterpret_cast<>.

Fix warning: QByteArray(QByteArrayDataPtr dd) constructor warning
C4946: reinterpret_cast used between related classes: 'QArrayData'
and 'QTypedArrayData<T>'.

Task-number: QTBUG-32559
Change-Id: I06356902f79ed6bf784127ff0c3a97d3263a25da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Expose invokables that are not slots in the xml

Without it the invocations were working but were not listed on introspection

Change-Id: Ie62f7dc3577f52b6888ddebf0392fdf51f2845d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Gtk theme: emit currentFontChanged() in font dialog helper

There is no signal for it in gtk font selection. We should emit this
signal just before accept() was emitted.

Change-Id: Ie31d96b789436607b134c84dd77a4b9be9e9a550
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
xcb: mouse wheel does not focus a window

The window should react to the wheel event (e.g. scroll content)
but without becoming focused; this is the X11 convention.

Task-number: QTBUG-32517
Change-Id: I7e12425e5a6e1549b7f23dc318612a436c24d14b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Check if the widgetItem is valid before accessing widget() on it

If a state was restored but not all the dockwidgets that were available
before are available at the time of restoration then when dragging a
dockwidget to where the unavailable one is expected to be would cause a
crash.

Change-Id: I829d93041b7950a3546ba4e6c3764b169f276315
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
eglfs: Fix updates when resizing backing store

We would resize the backing store without resizing the viewport,
which would cause all subsequent blits of the backing store to the
screen to look broken.

Task-number: QTBUG-32146
Change-Id: I65bae051b7cfbbc61fc285e4baa74685d5639569
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Mark qt5_use_modules as obsolete.

Forward-port of cb7f32f5b861fe115fa71f64500a5cbb0b643f1b (Mark
qt4_use_modules and qt4_automoc as obsolete., 2013-07-04) from
cmake.git.

Change-Id: I0c24408ef06bc93eb0e55108cf4eab2f8cbd19cb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Clear focus if the widget being deleted is the parent's focus child.

If a widget is deleted as a result of a window activation changed then
it is possible that the parent does not clear the focus because of the
activation change. If the focus child is actually part of an embedded
widget in the graphicsview then it needs to be handled explicitly in
this case too.

Change-Id: I3e7a2b963f175828de4c19283178560abca91235
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
eglfs: allow egl native window to be zero

Change the checking for created EGLNativeWindowType so that zero
is a valid value. This is the case e.g, with BeagleBoard, where
widget application cannot be run without this change.

Change-Id: I36c30091e1a5a0598ae3822d0be8dc4362779c0b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
configure: Fix qtwebkit-examples-and-demos -> qtwebkit-examples

Change-Id: I950912a883c263ee4bbae4d1da53c66aa870be70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Don't run this code on WinCE, the variable will be unused.

Change-Id: Id472e6e18759227943a24aa723963671bdb52164
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix build with QT_NO_CURSOR.

Just moved applyCursor() and defaultCursor() to a #ifndef block.

Change-Id: I14c21aa509395fb1bd72d389cfc46f0f34ab7649
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix typo form->from

Change-Id: Ifa47cec0e454228d33c917c0baa6d0686955af5a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>