Yet another workaround for the previous commit.

This commit is contained in:
LoRd_MuldeR 2012-03-24 01:29:06 +01:00
parent 2da05e2324
commit ff452c17ca
3 changed files with 5 additions and 25 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 915
#define VER_LAMEXP_BUILD 917
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)

View File

@ -30,8 +30,8 @@
#include "WinSevenTaskbar.h"
#define EPS (1.0E-5)
#define FADE_DELAY 4
#define THREAD_RUNNING(THRD) (((THRD)->isRunning()) ? (!((THRD)->wait(16))) : false)
////////////////////////////////////////////////////////////
// Constructor
@ -119,11 +119,11 @@ void SplashScreen::showSplash(QThread *thread)
timer->start(30720);
//Loop while thread is still running
bool bStillRunning = threadStillRunning(thread);
while(bStillRunning)
bool bIsRunning = THREAD_RUNNING(thread);
while(bIsRunning)
{
loop->exec();
if(bStillRunning = threadStillRunning(thread))
if(bIsRunning = THREAD_RUNNING(thread))
{
qWarning("Potential deadlock in initialization thread!");
}
@ -177,21 +177,3 @@ bool SplashScreen::winEvent(MSG *message, long *result)
{
return WinSevenTaskbar::handleWinEvent(message, result);
}
////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
////////////////////////////////////////////////////////////
bool SplashScreen::threadStillRunning(const QThread *thread)
{
for(int i = 0; i < 128; i++)
{
if(!(thread->isRunning()))
{
return false;
}
QThread::yieldCurrentThread();
}
return thread->isRunning();
}

View File

@ -41,8 +41,6 @@ private:
QMovie *m_working;
bool m_canClose;
static inline bool threadStillRunning(const QThread *thread);
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);