OSDN Git Service

Fixed a potential live-lock situation: Signals from the QThread can get lost, before...
authorlordmulder <mulder2@gmx.de>
Thu, 23 Feb 2012 16:00:22 +0000 (17:00 +0100)
committerlordmulder <mulder2@gmx.de>
Thu, 23 Feb 2012 16:00:22 +0000 (17:00 +0100)
src/Config.h
src/Dialog_SplashScreen.cpp

index 2290248..f83c0bf 100644 (file)
@@ -30,7 +30,7 @@
 #define VER_LAMEXP_MINOR_LO                                    4
 #define VER_LAMEXP_TYPE                                                Beta
 #define VER_LAMEXP_PATCH                                       1
-#define VER_LAMEXP_BUILD                                       890
+#define VER_LAMEXP_BUILD                                       891
 
 ///////////////////////////////////////////////////////////////////////////////
 // Tool versions (minimum expected versions!)
index 579986c..48461da 100644 (file)
@@ -26,6 +26,7 @@
 #include <QThread>
 #include <QMovie>
 #include <QKeyEvent>
+#include <QTimer>
 
 #include "WinSevenTaskbar.h"
 
@@ -110,7 +111,12 @@ void SplashScreen::showSplash(QThread *thread)
        }
 
        //Loop while thread is running
-       loop->exec();
+       while(thread->isRunning())
+       {
+               QTimer::singleShot(15000, loop, SLOT(quit()));
+               loop->exec();
+               if(thread->isRunning()) qWarning("Potential deadlock in Init thread!");
+       }
        
        //Fade out
        for(int i = 100; i >= 0; i--)