23 #include <xqserviceutil.h> |
23 #include <xqserviceutil.h> |
24 #include <QSqlQuery> |
24 #include <QSqlQuery> |
25 #include <QSqlError> |
25 #include <QSqlError> |
26 #include <HbApplication> |
26 #include <HbApplication> |
27 #include <xqappmgr.h> |
27 #include <xqappmgr.h> |
28 #include <HbMessageBox.h> |
28 #include <hbmessagebox.h> |
29 #include <HbView> |
29 #include <HbView> |
30 |
30 |
31 #include "conversationsengine.h" |
31 #include "conversationsengine.h" |
32 #include "msglistview.h" |
32 #include "msglistview.h" |
33 #include "msgunieditorview.h" |
33 #include "msgunieditorview.h" |
677 mPreviousView = data.at(1).toInt(); |
674 mPreviousView = data.at(1).toInt(); |
678 |
675 |
679 //switch to univiewer. |
676 //switch to univiewer. |
680 if (data.length() > 2) { |
677 if (data.length() > 2) { |
681 qint32 contactId = data.at(2).toLongLong(); |
678 qint32 contactId = data.at(2).toLongLong(); |
682 QByteArray dataArray = data.at(3).toByteArray(); |
679 qint32 messageId = data.at(3).toInt(); |
683 int msgCount = data.at(4).toInt(); |
680 int msgCount = data.at(4).toInt(); |
684 |
681 int canForwardMessage = data.at(5).toInt(); |
685 ConvergedMessage *message = new ConvergedMessage; |
682 |
686 QDataStream stream(&dataArray, QIODevice::ReadOnly); |
|
687 message->deserialize(stream); |
|
688 qint32 messageId = message->id()->getId(); |
|
689 if (!mUniViewer) { |
683 if (!mUniViewer) { |
690 mUniViewer = new UnifiedViewer(messageId); |
684 mUniViewer = new UnifiedViewer(messageId, canForwardMessage); |
691 mUniViewer->setNavigationAction(mBackAction); |
685 mUniViewer->setNavigationAction(mBackAction); |
692 mMainWindow->addView(mUniViewer); |
686 mMainWindow->addView(mUniViewer); |
693 connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this, |
687 connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this, |
694 SLOT(switchView(const QVariantList&))); |
688 SLOT(switchView(const QVariantList&))); |
695 } |
689 } |
696 mUniViewer->populateContent(messageId, true, msgCount); |
690 mUniViewer->populateContent(messageId, true, msgCount); |
697 delete message; |
|
698 } |
691 } |
699 |
692 |
700 if(mPreviousView==MsgBaseView::CV && mConversationView) |
693 if(mPreviousView==MsgBaseView::CV && mConversationView) |
701 { |
694 { |
702 mConversationView->setPSCVId(false); |
695 mConversationView->setPSCVId(false); |