Add QEnableSharedFromThis class

It enables you to get a valid QSharedPointer instance to 'this',
when all you have is 'this'.

Task-number: QTBUG-7287
Change-Id: I3ed1c9c4d6b110fe02302312cc3c4a75e9d95a0c
Reviewed-by: Richard J. Moore <rich@kde.org>
OS X: Fix build with QT_NO_OPENGL

Task-number: QTBUG-31151
Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Disable some more qtbase examples for dynamic gl builds

Examples using OpenGL 1.x cannot be migrated. Therefore, similarly to ES
builds, we just disable them.

Change-Id: I76e888d2ecfb2582ae35853d9dcdd0cb686fddc6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Do not add QOffscreenSurface windows to the global list

QOffscreenSurface has to stay usable even after returning from app.exec().
Hence close()ing the underlying hidden window, that is used on platforms that
do not provide real offscreen surfaces, is wrong.

Normally all QWindows are closed (and thus destroy()'ed) when quitting the application,
meaning the the offscreen surface cannot be made current anymore after returning
from exec(). This is an unnecessary limitation and makes certain cleanup operations
impossible.

Task-number: QTBUG-39908
Change-Id: Iea1489378a18f29ff84ba8f13a6dad2d66d2b315
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Include QMetaType in the native context headers

Just to be safe. The Q_DECLARE_METATYPE needs this.
And including some Qt header is necessary anyways.

Change-Id: I6e97493434760f37a79e735293cef8d4213c2e11
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Cleanup local var usage

Change-Id: I24c8bc1eef444e3ef4823d5d092089e4f308585b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Enablers for QQuickWidget render() support.

Add a QImage based fallback for renderToTexture widgets, and use
that when rendering to something else than a QWidgetBackingStore.

Change-Id: I415a3a27c4ecb4ddbac45181c5a568b01ac5cb7a
Task-number: QTBUG-39562
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Emit a notifications when senderObject and signal are changed.

In order to properly use QSignalTransition object in QML we need to
know when these properties are changed.

Change-Id: I7ca318d50513086146b85eaeee4dabbcdef8c299
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Emit a notifications when targetState and targetStates are changed.

In order to properly use QAbstractTransition object in QML we need to
know when these properties are changed.

Change-Id: I5449ecf3fce33e164f645d7263f21b20abfcd026
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
qHash overload for Q{Explicitly,}SharedDataPointer

Interestingly, before that patch this compiled fine:

  typedef Q{Explicitly,}SharedDataPointer<QSharedData> Ptr;
  Ptr p(new QSharedData);
  auto hash = qHash(p);

This was because both Q{Explicitly,}SharedDataPointer overload 'operator
bool()' => qHash(int) was accepted. This, however, doesn't make sense.

Someone should probably take care of applying the safe bool idiom to
these classes as well.

Change-Id: I8bb6b2aacaa6166da817a6f3847093fd20a05a67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Make QFreeList constexpr

It's still not a literal type because the destructor is not constexpr

Change-Id: If89bdfdd3f0ffe9bdd5a7953e872e520e92cfd66
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>