messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin.cpp
equal
deleted
inserted
replaced
28 // @see header |
28 // @see header |
29 //--------------------------------------------------------------- |
29 //--------------------------------------------------------------- |
30 UniBioMessageDataPlugin::UniBioMessageDataPlugin(QObject* parent) : |
30 UniBioMessageDataPlugin::UniBioMessageDataPlugin(QObject* parent) : |
31 QObject(parent) |
31 QObject(parent) |
32 { |
32 { |
33 d_ptr = new UniBioMessageDataPluginPrivate(this); |
33 QT_TRAP_THROWING(d_ptr = new UniBioMessageDataPluginPrivate(this)); |
34 } |
34 } |
35 |
35 |
36 // UniBioMessageDataPlugin::~UniBioMessageDataPlugin() |
36 // UniBioMessageDataPlugin::~UniBioMessageDataPlugin() |
37 // @see header |
37 // @see header |
38 //--------------------------------------------------------------- |
38 //--------------------------------------------------------------- |
118 // UniBioMessageDataPlugin::attachmentList() |
118 // UniBioMessageDataPlugin::attachmentList() |
119 // @see header |
119 // @see header |
120 //--------------------------------------------------------------- |
120 //--------------------------------------------------------------- |
121 UniMessageInfoList UniBioMessageDataPlugin::attachmentList() |
121 UniMessageInfoList UniBioMessageDataPlugin::attachmentList() |
122 { |
122 { |
123 RFile file = d_ptr->attachmentL(); |
123 RFile file; |
|
124 QT_TRAP_THROWING(file = d_ptr->attachmentL()); |
124 |
125 |
125 if(attachmentCount() == 0) |
126 if(attachmentCount() == 0) |
126 { |
127 { |
127 file.Close(); |
128 file.Close(); |
128 return QList<UniMessageInfo*> (); |
129 return QList<UniMessageInfo*> (); |
133 QString path; |
134 QString path; |
134 QString mimetype; |
135 QString mimetype; |
135 int size; |
136 int size; |
136 |
137 |
137 TFileName fullName; |
138 TFileName fullName; |
138 User::LeaveIfError(file.FullName(fullName)); |
139 qt_symbian_throwIfError(file.FullName(fullName)); |
139 User::LeaveIfError(file.Size(size)); |
140 qt_symbian_throwIfError(file.Size(size)); |
140 |
141 |
141 path = XQConversions::s60DescToQString(*fullName.AllocL()); |
142 path = XQConversions::s60DescToQString(*fullName.AllocL()); |
142 |
143 |
143 UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); |
144 UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); |
144 attlist << msgobj; |
145 attlist << msgobj; |