Remove unnecessary friend declarations from qevent.h.

Change-Id: Iec35b94f3898004850a076d4760d675248246ea7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
qpa: Merge qwidget_qpa.cpp into qwidget.cpp

Change-Id: I8424ec7290b366f4c76999a956fce1428fc56626
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Unify all mid() functions in QtBase.

Up to now, Qt had at least 3 different implementations of the mid().
Only QString::mid implementation was not crashing on edge cases and
was protected against overflows, therefore I picked that one as the
base implementation, even if it has weird semantics for an invalid
input.

As a side effect QVector::mid was slightly optimized to not detach in
all cases (which follows current QList behavior). Documentation of
QVector::mid and QList::mid was updated to not mention "copy of data"
which could suggest that the mid() result is detached.

QStringRef::mid was fixed and now it follows general Qt behavior, by
returning a null value for a null input.

Change-Id: Ie9ff5d98372bd193d66508e6dd92b6ed1180ad9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add viewport transform to QMatrix4x4

This allows to easily create a matrix that performs the transformation
used by OpenGL fixed function to go from normalized device coordinates
to window coordinates.

This comes in useful if you need to perform the NDC->window coordinate
conversion inside a shader.

Change-Id: I183b3545bfb3eb1e8b13fc3172911b46926fcbb7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Expose multisample settings on QOpenGLTexture

Change-Id: I877f4139aed8bb03b798818a3fac00dab1523ce1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Remove friend class QETWidget.

The class no longer exists in Qt 5.

Change-Id: Icd98c151f8e06910a3240d0bec6fff333a8ef3e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Optimize QVector::mid

Change-Id: Iff7d9ec85a095c6712e6045e7708bb88eac629e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Ensure we don't re-use webfonts where the "local" font has been requested

For webfonts, we can't rely on the fontDef (and hence the cache Key) alone,
since the resulting fontcache key might be strictly identical.
Instead we have to check if the cached engine doesn't belong to a webfont
when we're looking for a "local" font.

Change-Id: I2de11c8fdbef53362b66674d3429a042e1835757
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>