--- a/emailservices/nmclientapi/src/nmapieventnotifier.cpp Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapieventnotifier.cpp Wed Jun 23 18:00:21 2010 +0300
@@ -74,7 +74,7 @@
if (mNmApiEventNotifierPrivate->mIsRunning) {
result = true;
}
- else
+ else {
if (!mNmApiEventNotifierPrivate->initializeEngine()) {
mNmApiEventNotifierPrivate->mIsRunning = false;
result = false;
@@ -85,11 +85,15 @@
connect(mNmApiEventNotifierPrivate->mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), mNmApiEventNotifierPrivate,
SLOT(emailStoreEvent(NmApiMessage)), Qt::QueuedConnection);
-
+
+ // initiate event listening
+ mNmApiEventNotifierPrivate->mEngine->startCollectingEvents();
+
mNmApiEventNotifierPrivate->mEmitSignals->start();
mNmApiEventNotifierPrivate->mIsRunning = true;
result = true;
}
+ }
return result;
}
@@ -129,6 +133,7 @@
qRegisterMetaType<EmailClientApi::NmApiMailboxEvent> ("EmailClientApi::NmApiMailboxEvent");
qRegisterMetaType<EmailClientApi::NmApiMessageEvent> ("EmailClientApi::NmApiMessageEvent");
+
NmApiMessage events;
while (!mNmApiEventNotifierPrivate->mBufferOfEvents.isEmpty()) {
events = mNmApiEventNotifierPrivate->mBufferOfEvents.takeFirst();