Fix crash in QSoundEffect when using it from a non-GUI thread.
The internal QIODevice used as data source was not set as child of the parent QSoundEffectPrivate. If moveToThread() was called on the QSoundEffect, the QIODevice would still receive events on the main thread, leading to race conditions. Task-number: QTBUG-46359 Change-Id: I180da2fb498108b316fd9b5b5cc84376b360fa3f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
@@ -297,6 +297,7 @@ void QSoundEffectPrivate::setCategory(const QString &category)
|
||||
}
|
||||
|
||||
PrivateSoundSource::PrivateSoundSource(QSoundEffectPrivate* s):
|
||||
QIODevice(s),
|
||||
m_loopCount(1),
|
||||
m_runningCount(0),
|
||||
m_playing(false),
|
||||
|
||||
Reference in New Issue
Block a user