forked from qt-creator/qt-creator
Win: Fix QThread is destroyed while still running warning
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user