Closed Trim closed 7 years ago
To be more clear, my log messages gave me:
root@neo:~/Applications/qtopiamail/mail# qtmail
Messaging : QTMailWindow ctor begin
Messaging : pushLocation - 0 : ActionList
Messaging : pushLocation - 1 : FolderList
Messaging : pushLocation - 2 : MessageList
Messaging : pushLocation - 3 : Viewer - 29515
Messaging : Look for plain part in 0 parts
I've checked in the qtmail .sqlite db file, the mail 29515 is well indexed and stored (in the db we find some information like subject, messagetype, ...) and the mail content isn't stored in this db, but it's read from the file I've already checked (so the issue seems come from the parsing of this file).
Summary of functions called to read a mail:
All begins from file qtmoko/src/applications/qtopiamail/reader.cpp :
void ReadMail::loadMessage(const QMailMessageId &id)
-> mail = QMailMessage(id);
-> Constructor of QMailMessage simply call: QMailStore::instance()->message(id);
This constructor is defined in file qtmoko/src/libraries/qtopiamail/qmailmessage.cpp and it call simply this function:
QMailMessage QMailStore::message(const QMailMessageId& id) const
{
// Resolve from overloaded member functions:
AttemptResult (QMailStore::*func)(const QMailMessageId&, QMailMessage*, MailStoreReadLock&) const = &QMailStore::attemptMessage;
QMailMessage msg;
repeatedly<ReadAccess>(bind(func, this, cref(id), &msg), "message(id)");
qLog(Messaging)<< "Just instancied message with " <<msg.partCount()<<" parts";
return msg;
}
And it's finished here: the mail were retrieved and we can display it (that's the next step). Unfortunately, none has read the message file saved in /home/root/Applications/qtopiamail/mail/ . Indeed this log message I've added say me always '0'
I expected that the QMailStore class will do that automatically when instancing QMailMessage, but in fact it doesn't.
The database call with repeatedly
function is too abstract for me and I can't find how to get the mailfile
value retrieved from the database. Could someone help me ?
My idea is to use the function QMailMessage::fromRfc2822File(QString filename) to force parts update... I'm just thinking that 'one part' messages are correctly read from the file... so I don't have any idea how to continue my investigation for multi-part messages...
Wont have time and motivation to look further.
I'm looking for the error of QtMail which don't display content of all mails (typically mails from github).
I've added some log informations (see genericBrowserDebug branch) in the plugins/viewers/generic/browser.cpp and it told me that the mail had no parts, but it has a text/plain and text/html part if I check the mail source from desktop. I've checked too that the mail source is well saved on my GTA04 (files in /home/root/Applications/qtopiamail/mail).
So it seems the issue comes from the QMailMessage class which doesn't find correctly mail parts.