Fix usage of QMutexLocker, destroy it only at end of scope

Change-Id: I8b47d49f7a83a71a1b90ab57ee7bc3791ef59667
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Sergio Martins
2016-01-11 00:02:54 +00:00
committed by Yoann Lopes
parent c953ef3910
commit 0521766417
2 changed files with 2 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ void QT_WIN_CALLBACK QWindowsAudioInput::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
if(!qAudio)
return;
QMutexLocker(&qAudio->mutex);
QMutexLocker locker(&qAudio->mutex);
switch(uMsg) {
case WIM_OPEN:

View File

@@ -90,7 +90,7 @@ void CALLBACK QWindowsAudioOutput::waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
if(!qAudio)
return;
QMutexLocker(&qAudio->mutex);
QMutexLocker locker(&qAudio->mutex);
switch(uMsg) {
case WOM_OPEN: