diff options
author | Bai Jing <jing.t.bai@nokia.com> | 2012-06-06 17:04:31 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 11:42:26 +0200 |
commit | 585079a7666f3239f9c6fa1ce4ac3e07cd21dacc (patch) | |
tree | a3f87574e3613d299a8ca50f915500b0eea8de67 /tools | |
parent | 6a7f90240c9a4ada58845a2d2613aff5a9766bda (diff) |
fix jsondb-client doesn't quit properly
When quiting while the thread is not running, it waits there forever
This causes jsondb-client doesn't quit when it receives "quit"
command
Bug: 3539
Change-Id: Ibc4b6374c4faca0424a9ebb1a4b5a259b3572c73
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/jsondb-client/client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/jsondb-client/client.cpp b/tools/jsondb-client/client.cpp index 1e5e55d5..dcdf9398 100644 --- a/tools/jsondb-client/client.cpp +++ b/tools/jsondb-client/client.cpp @@ -218,8 +218,8 @@ Client::Client( QObject *parent ) : Client::~Client() { - if (mInputThread) { - mInputThread->terminate(); + if (mInputThread && mInputThread->isRunning()) { + mInputThread->quit(); mInputThread->wait(1000); delete mInputThread; mInputThread = 0; |