CoreWLan: terminate scan thread in QCoreWlanEngine destructor
The scan thread can take an indeterminate amount of time, often longer than the 5 seconds we had previously waited. Since this destructor is only called when the application quits, it's ok that some resources may be lost. Task-number: QTBUG-36000 Change-Id: Ib184156b5a23c39ea4f7937a26ecb099554bd4de Reviewed-by: Peter Hartmann <phartmann@blackberry.com>bb10
parent
4dc751360a
commit
1d7408cc8b
|
|
@ -419,7 +419,8 @@ QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
|
|||
|
||||
QCoreWlanEngine::~QCoreWlanEngine()
|
||||
{
|
||||
scanThread->wait(5000);
|
||||
scanThread->terminate();
|
||||
scanThread->wait();
|
||||
|
||||
while (!foundConfigurations.isEmpty())
|
||||
delete foundConfigurations.takeFirst();
|
||||
|
|
|
|||
|
|
@ -404,7 +404,8 @@ QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
|
|||
|
||||
QCoreWlanEngine::~QCoreWlanEngine()
|
||||
{
|
||||
scanThread->wait(5000);
|
||||
scanThread->terminate();
|
||||
scanThread->wait();
|
||||
|
||||
while (!foundConfigurations.isEmpty())
|
||||
delete foundConfigurations.takeFirst();
|
||||
|
|
|
|||
Loading…
Reference in New Issue