Better workaround for the previous commit.
This commit is contained in:
parent
18094c66f0
commit
2da05e2324
@ -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 914
|
#define VER_LAMEXP_BUILD 915
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Tool versions (minimum expected versions!)
|
// Tool versions (minimum expected versions!)
|
||||||
|
@ -38,7 +38,8 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
SplashScreen::SplashScreen(QWidget *parent)
|
SplashScreen::SplashScreen(QWidget *parent)
|
||||||
: QFrame(parent, Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint)
|
:
|
||||||
|
QFrame(parent, Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint)
|
||||||
{
|
{
|
||||||
//Init the dialog, from the .ui file
|
//Init the dialog, from the .ui file
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
@ -118,16 +119,13 @@ void SplashScreen::showSplash(QThread *thread)
|
|||||||
timer->start(30720);
|
timer->start(30720);
|
||||||
|
|
||||||
//Loop while thread is still running
|
//Loop while thread is still running
|
||||||
while(thread->isRunning())
|
bool bStillRunning = threadStillRunning(thread);
|
||||||
|
while(bStillRunning)
|
||||||
{
|
{
|
||||||
loop->exec();
|
loop->exec();
|
||||||
if(thread->isRunning())
|
if(bStillRunning = threadStillRunning(thread))
|
||||||
{
|
{
|
||||||
QThread::yieldCurrentThread();
|
qWarning("Potential deadlock in initialization thread!");
|
||||||
if(thread->isRunning())
|
|
||||||
{
|
|
||||||
qWarning("Potential deadlock in initialization thread!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,3 +177,21 @@ 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();
|
||||||
|
}
|
||||||
|
@ -41,6 +41,8 @@ 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user