# HG changeset patch # User hgs # Date 1284734793 -19800 # Node ID e8a69c93c830d31407845f68c0b23b2d9d5e4416 # Parent fc91263aee62b29f953bfead4dafca35c91da84a 201037_05 diff -r fc91263aee62 -r e8a69c93c830 messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h --- a/messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h Fri Sep 17 20:01:45 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h Fri Sep 17 20:16:33 2010 +0530 @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -29,7 +29,7 @@ /** * Class for sending service request */ -class ServiceRequestSenderTask :public QThread +class ServiceRequestSenderTask :public QObject,public QRunnable { Q_OBJECT @@ -37,7 +37,7 @@ /** * Constructor */ - ServiceRequestSenderTask(qint64 conversationId,QObject* parent=0); + ServiceRequestSenderTask(qint64 conversationId); /** * Destructor diff -r fc91263aee62 -r e8a69c93c830 messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp --- a/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp Fri Sep 17 20:01:45 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp Fri Sep 17 20:16:33 2010 +0530 @@ -14,6 +14,8 @@ * Description: Widget class for Notificaiton Dialog Plugin * */ +#include +#include #include "debugtraces.h" #include @@ -42,9 +44,7 @@ // ServiceRequestSenderTask::ServiceRequestSenderTask // @see msgnotificationdialogwidget.h // ---------------------------------------------------------------------------- -ServiceRequestSenderTask::ServiceRequestSenderTask(qint64 conversationId, - QObject* parent): -QThread(parent), +ServiceRequestSenderTask::ServiceRequestSenderTask(qint64 conversationId): mConvId(conversationId) { } @@ -81,10 +81,9 @@ args << QVariant(mConvId); request->setArguments(args); + request->setSynchronous(true); request->send(); delete request; - - exec(); } void ServiceRequestSenderTask::onRequestCompleted(const QVariant& value) @@ -92,8 +91,6 @@ Q_UNUSED(value); serviceTaskLaunched = false; emit serviceRequestCompleted(); - - quit(); } void ServiceRequestSenderTask::onRequestError(int errorCode, const QString& errorMessage) @@ -102,8 +99,6 @@ Q_UNUSED(errorMessage); serviceTaskLaunched = false; emit serviceRequestCompleted(); - - quit(); } // ---------------------------------------------------------------------------- @@ -251,11 +246,11 @@ void MsgNotificationDialogWidget::widgetActivated() { ServiceRequestSenderTask* task = - new ServiceRequestSenderTask(mConversationId,this); + new ServiceRequestSenderTask(mConversationId); connect(task,SIGNAL(serviceRequestCompleted()), this,SIGNAL(deviceDialogClosed())); serviceTaskLaunched = true; - task->start(); + QThreadPool::globalInstance()->start(task); enableTouchActivation(false); }