# HG changeset patch # User hgs # Date 1284459622 -19800 # Node ID 2206bb7ddbece683aa4e88e99f57196b741a4640 # Parent fdbe8253b596a6ef51ed27758d34d855b81428be 201035_04 diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/conf/messaging_conf.pro --- a/messagingapp/conf/messaging_conf.pro Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/conf/messaging_conf.pro Tue Sep 14 15:50:22 2010 +0530 @@ -23,8 +23,7 @@ symbian{ BLD_INF_RULES.prj_exports += \ "$${LITERAL_HASH}include " \ - "messaging.confml APP_LAYER_CONFML(messaging.confml)" \ - "CI_messaging.confml APP_LAYER_CONFML(CI_messaging.confml)" \ + "messaging.confml APP_LAYER_CONFML(messaging.confml)" \ "messaging_101F87EB.crml APP_LAYER_CRML(messaging_101F87EB.crml)" \ "messaging_101F87EC.crml APP_LAYER_CRML(messaging_101F87EC.crml)" \ "messaging_101F87ED.crml APP_LAYER_CRML(messaging_101F87ED.crml)" \ diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h --- a/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h Tue Sep 14 15:50:22 2010 +0530 @@ -18,15 +18,17 @@ #ifndef UNIFIED_VIEWER_H #define UNIFIED_VIEWER_H -#ifdef BUILD_UNI_VIEWER_DLL -#define UNI_VIEWER_DLL Q_DECL_EXPORT +#ifdef MSGUI_UNIT_TEST + #define UNI_VIEWER_DLL #else -#define UNI_VIEWER_DLL Q_DECL_IMPORT + #ifdef BUILD_UNI_VIEWER_DLL + #define UNI_VIEWER_DLL Q_DECL_EXPORT + #else + #define UNI_VIEWER_DLL Q_DECL_IMPORT + #endif #endif -#include #include "msgbaseview.h" - #include "convergedmessage.h" class UniViewerFeeder; @@ -58,7 +60,7 @@ /** * Populates the content on the widget */ - void populateContent(const qint32 messageId, bool update, int msgCount, qint64 conversationId=-1); + void populateContent(const qint32 messageId, bool update, int msgCount, qint64 conversationId = -1); /** * Event handler @@ -158,7 +160,7 @@ * Owned */ UniContentsWidget* mContentsWidget; - + /** * Conversation ID */ @@ -173,12 +175,18 @@ * Message id */ qint32 mMessageId; - + /** * Message count */ int mMsgCount; +#ifdef MSGUI_UNIT_TEST + /** + * Unit Testing + */ + friend class TestUnifiedViewer; +#endif }; #endif diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h Tue Sep 14 15:50:22 2010 +0530 @@ -85,9 +85,6 @@ */ void handleOpen(); - - - /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture * events back to back. diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Tue Sep 14 15:50:22 2010 +0530 @@ -88,9 +88,6 @@ */ void handleOpen(); - - - /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture * events back to back. diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Tue Sep 14 15:50:22 2010 +0530 @@ -87,9 +87,6 @@ */ void handleOpen(); - - - /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture * events back to back. diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp --- a/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Tue Sep 14 15:50:22 2010 +0530 @@ -29,6 +29,7 @@ #include #include #include +#include // USER INCLUDES #include "uniscrollarea.h" @@ -64,14 +65,12 @@ // UnifiedViewer::UnifiedViewer // constructor //---------------------------------------------------------------------------- -UnifiedViewer::UnifiedViewer(const qint32 messageId, - QGraphicsItem *parent) : +UnifiedViewer::UnifiedViewer(const qint32 messageId, QGraphicsItem *parent) : MsgBaseView(parent), mConversationID(-1) { QDEBUG_WRITE("UnifiedViewer contruction start"); - if (!HbStyleLoader::registerFilePath(":/layouts")) - { + if (!HbStyleLoader::registerFilePath(":/layouts")) { QDEBUG_WRITE("ERROR: UnifiedViewer -> HbStyleLoader::registerFilePath"); } @@ -81,13 +80,12 @@ mScrollArea = new UniScrollArea(this); this->setWidget(mScrollArea); - mContentsWidget = new UniContentsWidget(mViewFeeder,this); + mContentsWidget = new UniContentsWidget(mViewFeeder, this); - connect(mContentsWidget,SIGNAL(sendMessage(const QString&,const QString&)), - this, SLOT(sendMessage(const QString&,const QString&))); + connect(mContentsWidget, SIGNAL(sendMessage(const QString&,const QString&)), this, + SLOT(sendMessage(const QString&,const QString&))); - connect(mScrollArea, SIGNAL(scrolledToNextSlide()), - mContentsWidget, SLOT(populateNextSlide())); + connect(mScrollArea, SIGNAL(scrolledToNextSlide()), mContentsWidget, SLOT(populateNextSlide())); mScrollArea->setContentWidget(mContentsWidget); mScrollArea->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp Tue Sep 14 15:50:22 2010 +0530 @@ -180,8 +180,6 @@ QTimer::singleShot(300,this,SLOT(regrabGesture())); } - - //---------------------------------------------------------------------------- // UniViewerAttachmentWidget::handleShortTap // @see header file diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Tue Sep 14 15:50:22 2010 +0530 @@ -159,8 +159,6 @@ QTimer::singleShot(300,this,SLOT(regrabGesture())); } - - //--------------------------------------------------------------- // UniViewerAudioWidget::regrabGesture // @see header file diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Tue Sep 14 15:50:22 2010 +0530 @@ -170,8 +170,6 @@ QTimer::singleShot(300,this,SLOT(regrabGesture())); } - - //--------------------------------------------------------------- // UniViewerPixmapWidget::regrabGesture // @see header file diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/shareui/inc/shareuiprivate.h --- a/messagingapp/shareui/inc/shareuiprivate.h Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/shareui/inc/shareuiprivate.h Tue Sep 14 15:50:22 2010 +0530 @@ -35,6 +35,7 @@ class HbListViewItem; class HbTextItem; class HbIconItem; +class QTranslator; #define SERVICE_INTERFACE "com.nokia.symbian.IFileShare" #define SHARE_OP "send(QVariant)" @@ -228,6 +229,18 @@ XQApplicationManager mAppManager; /** + * Translator member variable + * Owned + */ + QTranslator* mTranslator; + + /** + * Translator member variable + * Owned + */ + QTranslator* mTranslator_comm; + + /** * Whether to launch the sending application as embedded or not. */ bool mIsEmbedded; diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/shareui/src/shareui.cpp --- a/messagingapp/shareui/src/shareui.cpp Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/shareui/src/shareui.cpp Tue Sep 14 15:50:22 2010 +0530 @@ -20,9 +20,6 @@ #include "shareuiprivate.h" #include -#include -#include -#include /** * Default Constructor. * @@ -30,16 +27,6 @@ ShareUi::ShareUi() : d_ptr(NULL) { - QString locale = QLocale::system().name(); - QString path = "z:/resource/qt/translations/"; - - mTranslator = new QTranslator(); - mTranslator_comm = new QTranslator(); - - bool result = mTranslator->load(path + QString("share_") + locale); - result = mTranslator_comm->load(path + QString("common_") + locale); - qApp->installTranslator(mTranslator); - qApp->installTranslator(mTranslator_comm); } @@ -52,10 +39,7 @@ if(d_ptr) { delete d_ptr; - } - delete mTranslator; - delete mTranslator_comm; - + } } /** diff -r fdbe8253b596 -r 2206bb7ddbec messagingapp/shareui/src/shareuiprivate.cpp --- a/messagingapp/shareui/src/shareuiprivate.cpp Tue Sep 07 13:28:39 2010 +0530 +++ b/messagingapp/shareui/src/shareuiprivate.cpp Tue Sep 14 15:50:22 2010 +0530 @@ -23,6 +23,9 @@ #include #include +#include +#include +#include #include #include #include @@ -56,6 +59,18 @@ mContentItemModel = 0; mContentListView = 0; mSharePopup = 0; + + QString locale = QLocale::system().name(); + QString path = "z:/resource/qt/translations/"; + + mTranslator = new QTranslator(); + mTranslator_comm = new QTranslator(); + + bool result = mTranslator->load(path + QString("share_") + locale); + result = mTranslator_comm->load(path + QString("common_") + locale); + qApp->installTranslator(mTranslator); + qApp->installTranslator(mTranslator_comm); + } /** @@ -63,6 +78,8 @@ */ ShareUiPrivate::~ShareUiPrivate() { + delete mTranslator; + delete mTranslator_comm; } /** diff -r fdbe8253b596 -r 2206bb7ddbec mmsengine/mmsengine.pro --- a/mmsengine/mmsengine.pro Tue Sep 07 13:28:39 2010 +0530 +++ b/mmsengine/mmsengine.pro Tue Sep 14 15:50:22 2010 +0530 @@ -46,8 +46,7 @@ #### loc file needed for rsc generation "./loc/MmsUi.loc APP_LAYER_LOC_EXPORT_PATH(mmsui.loc)" \ #### Export confml and crml files #### - "./conf/mmsengine.confml APP_LAYER_CONFML(mmsengine.confml)" \ - "./conf/CI_mmsengine.confml APP_LAYER_CONFML(CI_mmsengine.confml)" \ + "./conf/mmsengine.confml APP_LAYER_CONFML(mmsengine.confml)" \ "./conf/mmsengine_100058DB.crml APP_LAYER_CRML(mmsengine_100058db.crml)" \ "./conf/mmsengine_101FB0D5.crml APP_LAYER_CRML(mmsengine_101fb0d5.crml)" \ "./conf/mmsengine_101FB0D5.crml APP_LAYER_CRML(mmsengine_101fb0d9.crml)" diff -r fdbe8253b596 -r 2206bb7ddbec msg_plat/shareui_api/inc/shareui.h --- a/msg_plat/shareui_api/inc/shareui.h Tue Sep 07 13:28:39 2010 +0530 +++ b/msg_plat/shareui_api/inc/shareui.h Tue Sep 14 15:50:22 2010 +0530 @@ -34,7 +34,6 @@ // FORWARD DECLARATIONS class ShareUiPrivate; -class QTranslator; /** * This class offers message creation and sending services. @@ -70,21 +69,7 @@ * Owned */ ShareUiPrivate* d_ptr; - - /** - * Translator member variable - * Owned - */ - QTranslator* mTranslator; - - /** - * Translator member variable - * Owned - */ - QTranslator* mTranslator_comm; - Q_DECLARE_PRIVATE_D(d_ptr,ShareUi) - };