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_MINOR_LO 4
#define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 7 #define VER_LAMEXP_PATCH 7
#define VER_LAMEXP_BUILD 915 #define VER_LAMEXP_BUILD 917
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!) // Tool versions (minimum expected versions!)

View File

@ -30,8 +30,8 @@
#include "WinSevenTaskbar.h" #include "WinSevenTaskbar.h"
#define EPS (1.0E-5)
#define FADE_DELAY 4 #define FADE_DELAY 4
#define THREAD_RUNNING(THRD) (((THRD)->isRunning()) ? (!((THRD)->wait(16))) : false)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Constructor // Constructor
@ -119,11 +119,11 @@ void SplashScreen::showSplash(QThread *thread)
timer->start(30720); timer->start(30720);
//Loop while thread is still running //Loop while thread is still running
bool bStillRunning = threadStillRunning(thread); bool bIsRunning = THREAD_RUNNING(thread);
while(bStillRunning) while(bIsRunning)
{ {
loop->exec(); loop->exec();
if(bStillRunning = threadStillRunning(thread)) if(bIsRunning = THREAD_RUNNING(thread))
{ {
qWarning("Potential deadlock in initialization thread!"); qWarning("Potential deadlock in initialization thread!");
} }
@ -177,21 +177,3 @@ bool SplashScreen::winEvent(MSG *message, long *result)
{ {
return WinSevenTaskbar::handleWinEvent(message, 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; QMovie *m_working;
bool m_canClose; bool m_canClose;
static inline bool threadStillRunning(const QThread *thread);
protected: protected:
void keyPressEvent(QKeyEvent *event); void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event);