Workaround for Windows XP: It appears that QThread::isRunning() may return TRUE even after the QThread object has already emitted the "finished" signal. For some reason this only occurs on Windows XP, but never occurs on my Windows 7 machine. As a workaround we will call QThread::yieldCurrentThread() and then try again. This seems to fix the issue on my Windows XP machine.

This commit is contained in:
LoRd_MuldeR 2012-03-22 22:26:54 +01:00
parent 9e5fbdaaff
commit 18094c66f0
2 changed files with 8 additions and 4 deletions

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 7
#define VER_LAMEXP_BUILD 912
#define VER_LAMEXP_BUILD 914
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)

View File

@ -117,15 +117,19 @@ void SplashScreen::showSplash(QThread *thread)
//Start the timer
timer->start(30720);
//Loop while thread is running
//Loop while thread is still running
while(thread->isRunning())
{
loop->exec();
if(thread->isRunning())
{
QThread::yieldCurrentThread();
if(thread->isRunning())
{
qWarning("Potential deadlock in initialization thread!");
}
}
}
//Stop the timer
timer->stop();