Win: Fix QThread is destroyed while still running warning

This commit is contained in:
Tobias Hunger
2011-04-19 15:48:28 +02:00
parent 774fa49412
commit e7d4ee10cc
2 changed files with 8 additions and 0 deletions

View File

@@ -50,6 +50,12 @@ WinDebugInterface::WinDebugInterface(QObject *parent) :
start(); start();
} }
WinDebugInterface::~WinDebugInterface()
{
terminate(); // Creator is shutting down anyway, no need to clean up.
wait(500);
}
void WinDebugInterface::run() void WinDebugInterface::run()
{ {
HANDLE bufferReadyEvent = CreateEvent(NULL, FALSE, FALSE, L"DBWIN_BUFFER_READY"); HANDLE bufferReadyEvent = CreateEvent(NULL, FALSE, FALSE, L"DBWIN_BUFFER_READY");

View File

@@ -46,6 +46,8 @@ class WinDebugInterface : public QThread
public: public:
explicit WinDebugInterface(QObject *parent = 0); explicit WinDebugInterface(QObject *parent = 0);
~WinDebugInterface();
static WinDebugInterface *instance(); static WinDebugInterface *instance();
signals: signals: