diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-15 16:57:35 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-16 09:40:03 +0200 |
commit | 2a6a33767f7068fc5c43bc03f66df6329fc3cea6 (patch) | |
tree | 17d7fc69e626e80eb519b1f8e5e59b3f7e1a4737 /src/qml/qml/qqmltypeloader.cpp | |
parent | 0265eec3ae023acc46cd66d6966ec966fd4bdbf8 (diff) |
Don't start QQmlThreads from their constructor
In the case of derived classes (like the only user of QQmlThread) we
cannot guarantee that the class is completely constructed when the
thread starts. This includes the vtable which is necessary to decide
which virtual functions to call.
Change-Id: Ieaea67a72cc3b4f845b8621b34ca2928185917fb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 0b7cc8e911..0e2d4d027a 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -728,6 +728,8 @@ void QQmlDataBlob::ThreadData::setProgress(quint8 v) QQmlDataLoaderThread::QQmlDataLoaderThread(QQmlDataLoader *loader) : m_loader(loader), m_networkAccessManager(0), m_networkReplyProxy(0) { + // Do that after initializing all the members. + startup(); } QNetworkAccessManager *QQmlDataLoaderThread::networkAccessManager() const |