summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/addresslist.cpp2
-rw-r--r--noncore/net/mailit/emailclient.cpp8
-rw-r--r--noncore/net/mailit/emailhandler.cpp2
-rw-r--r--noncore/net/mailit/mailitwindow.cpp3
-rw-r--r--noncore/net/mailit/popclient.cpp10
-rw-r--r--noncore/net/mailit/readmail.cpp1
-rw-r--r--noncore/net/mailit/smtpclient.cpp20
-rw-r--r--noncore/unsupported/mailit/addresslist.cpp2
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp8
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp2
-rw-r--r--noncore/unsupported/mailit/mailitwindow.cpp3
-rw-r--r--noncore/unsupported/mailit/popclient.cpp10
-rw-r--r--noncore/unsupported/mailit/readmail.cpp1
-rw-r--r--noncore/unsupported/mailit/smtpclient.cpp20
14 files changed, 42 insertions, 50 deletions
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp
index 9fe558a..8d9ab91 100644
--- a/noncore/net/mailit/addresslist.cpp
+++ b/noncore/net/mailit/addresslist.cpp
@@ -126,9 +126,9 @@ void AddressList::read()
for ( it = m_list.begin(); it != m_list.end(); ++it )
{
//oc=(OContact*) it;
if ((*it).defaultEmail().length()!=0)
- addContact((*it).defaultEmail(),(*it).fullName());
+ addContact((*it).defaultEmail(),(*it).fileAs());
}
/*if (! f.open(IO_ReadOnly) )
return;
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp
index 6612541..0d82a9a 100644
--- a/noncore/net/mailit/emailclient.cpp
+++ b/noncore/net/mailit/emailclient.cpp
@@ -531,9 +531,9 @@ void EmailClient::readMail()
QString s, del;
QFile f(getPath(FALSE) + "inbox.txt");
// QFileInfo fi(f);
- qDebug( f.name());
+ //qDebug( f.name());
if ( f.open(IO_ReadOnly) ) { // file opened successfully
QTextStream t( &f ); // use a text stream
s = t.read();
@@ -585,14 +585,14 @@ void EmailClient::saveMail(QString fileName, QListView *view)
qWarning("could not open file");
return;
}
item = (EmailListItem *) view->firstChild();
- qDebug (QString("Write : ") );
+ //qDebug (QString("Write : ") );
QTextStream t(&f);
while (item != NULL) {
mail = item->getMail();
- qDebug(mail->rawMail);
- qDebug(mail->recipients.first());
+ //qDebug(mail->rawMail);
+ //qDebug(mail->recipients.first());
t << mail->rawMail;
mailconf->setGroup(mail->id);
mailconf->writeEntry("mailread", mail->read);
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp
index 9c1c814..03f8a28 100644
--- a/noncore/net/mailit/emailhandler.cpp
+++ b/noncore/net/mailit/emailhandler.cpp
@@ -162,10 +162,8 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
temp = lineShift + "." + lineShift;
if (in.right(temp.length()) != temp) {
- qWarning(in.right(temp.length()));
- qWarning(" . added at end of email as separator");
mail->rawMail += temp;
}
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp
index fd49c1f..2bf1dcb 100644
--- a/noncore/net/mailit/mailitwindow.cpp
+++ b/noncore/net/mailit/mailitwindow.cpp
@@ -26,13 +26,11 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
setCaption(tr(currentCaption));
views = new QWidgetStack(this);
setCentralWidget(views);
- qWarning("***Starting writeMail");
emailClient = new EmailClient(views, "client");
writeMail = new WriteMail(views, "writing");
readMail = new ReadMail(views, "reading");
- qWarning("***Finished readMail");
views->raiseWidget(emailClient);
connect(emailClient, SIGNAL(composeRequested()),
@@ -59,9 +57,8 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
connect(emailClient, SIGNAL(newCaption(const QString &)),
this, SLOT(updateCaption(const QString &)) );
viewingMail = FALSE;
- qWarning("***Finished MailitWindow");
}
MailItWindow::~MailItWindow()
{
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp
index 2f14ed2..f9cc337 100644
--- a/noncore/net/mailit/popclient.cpp
+++ b/noncore/net/mailit/popclient.cpp
@@ -118,9 +118,9 @@ void PopClient::incomingData()
// if ( !socket->canReadLine() )
// return;
response = socket->readLine();
- qDebug(response +" %d", status);
+ //qDebug(response +" %d", status);
switch(status) {
//logging in
case Init: {
@@ -130,9 +130,9 @@ void PopClient::incomingData()
if( start >= 0 && end > start )
{
timeStamp = response.mid( start , end - start + 1);
md5Source = timeStamp + popPassword;
- qDebug( md5Source);
+ //qDebug( md5Source);
// for( int i = 0; i < md5Source.length(); i++) {
// buff[i] = (QChar)md5Source[i];
// }
@@ -191,9 +191,9 @@ void PopClient::incomingData()
if (synchronize) {
//messages deleted from server, reload all
if (newMessages < lastSync)
lastSync = 0;
- messageCount = lastSync + 1;
+ messageCount = 1;
}
if (selected) {
int *ptr = mailList->first();
@@ -239,9 +239,9 @@ void PopClient::incomingData()
emit currentMailSize(mailSize);
status = Retr;
} else {
- qWarning(response);
+ //qWarning(response);
errorHandling(ErrUnknownResponse);
}
}
}
@@ -285,9 +285,9 @@ void PopClient::incomingData()
//complete mail downloaded
if ( (!preview ) || ((preview) && (mailSize <= headerLimit)) ){
emit newMessage(message, messageCount-1, mailSize, TRUE);
} else { //incomplete mail downloaded
- emit newMessage(message, messageCount-1, mailSize, FALSE);
+ emit newMessage(message, messageCount-1, mailSize, FALSE);
}
if (messageCount > newMessages) //that was the last message
status = Quit;
else { //ask for new message
diff --git a/noncore/net/mailit/readmail.cpp b/noncore/net/mailit/readmail.cpp
index a5e7147..7cd3e09 100644
--- a/noncore/net/mailit/readmail.cpp
+++ b/noncore/net/mailit/readmail.cpp
@@ -88,8 +88,9 @@ void ReadMail::init()
viewMenu->insertItem(Resource::loadPixmap("close"), "Close", this, SLOT(close()));
emailView = new QTextView( this, "emailView" );
+
setCentralWidget(emailView);
mime = new QMimeSourceFactory();
emailView->setMimeSourceFactory(mime);
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp
index 6699a90..b2e38e5 100644
--- a/noncore/net/mailit/smtpclient.cpp
+++ b/noncore/net/mailit/smtpclient.cpp
@@ -86,35 +86,35 @@ void SmtpClient::incomingData()
if (!socket->canReadLine())
return;
response = socket->readLine();
- qDebug(response);
+ //qDebug(response);
switch(status) {
case Init: {
if (response[0] == '2') {
status = From;
mailPtr = mailList.first();
*stream << "HELO there\r\n";
- qDebug("HELO");
+ //qDebug("HELO");
} else errorHandling(ErrUnknownResponse);
break;
}
case From: {
if (response[0] == '2') {
- *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n";
+ *stream << "MAIL FROM: " << mailPtr->from << "\r\n";
status = Recv;
- qDebug("MAIL FROM: "+mailPtr->from);
+ //qDebug("MAIL FROM: "+mailPtr->from);
} else errorHandling(ErrUnknownResponse);
break;
}
case Recv: {
if (response[0] == '2') {
it = mailPtr->to.begin();
if (it == NULL)
errorHandling(ErrUnknownResponse);
- *stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ *stream << "RCPT TO: " << *it << ">\r\n";
+ //qDebug("RCPT TO: "+ *it);
status = MRcv;
} else errorHandling(ErrUnknownResponse);
break;
}
@@ -122,9 +122,9 @@ void SmtpClient::incomingData()
if (response[0] == '2') {
it++;
if ( it != mailPtr->to.end() ) {
*stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ //qDebug("RCPT TO: "+ *it);
break;
} else {
status = Data;
}
@@ -133,9 +133,9 @@ void SmtpClient::incomingData()
case Data: {
if (response[0] == '2') {
*stream << "DATA\r\n";
status = Body;
- qDebug("DATA");
+ //qDebug("DATA");
emit updateStatus(tr("Sending: ") + mailPtr->subject);
} else errorHandling(ErrUnknownResponse);
break;
}
@@ -147,9 +147,9 @@ void SmtpClient::incomingData()
status = From;
} else {
status = Quit;
}
- qDebug("BODY");
+ //qDebug("BODY");
} else errorHandling(ErrUnknownResponse);
break;
}
case Quit: {
@@ -162,9 +162,9 @@ void SmtpClient::incomingData()
emit mailSent();
mailList.clear();
sending = FALSE;
socket->close();
- qDebug("QUIT");
+ //qDebug("QUIT");
} else errorHandling(ErrUnknownResponse);
break;
}
}
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp
index 9fe558a..8d9ab91 100644
--- a/noncore/unsupported/mailit/addresslist.cpp
+++ b/noncore/unsupported/mailit/addresslist.cpp
@@ -126,9 +126,9 @@ void AddressList::read()
for ( it = m_list.begin(); it != m_list.end(); ++it )
{
//oc=(OContact*) it;
if ((*it).defaultEmail().length()!=0)
- addContact((*it).defaultEmail(),(*it).fullName());
+ addContact((*it).defaultEmail(),(*it).fileAs());
}
/*if (! f.open(IO_ReadOnly) )
return;
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 6612541..0d82a9a 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -531,9 +531,9 @@ void EmailClient::readMail()
QString s, del;
QFile f(getPath(FALSE) + "inbox.txt");
// QFileInfo fi(f);
- qDebug( f.name());
+ //qDebug( f.name());
if ( f.open(IO_ReadOnly) ) { // file opened successfully
QTextStream t( &f ); // use a text stream
s = t.read();
@@ -585,14 +585,14 @@ void EmailClient::saveMail(QString fileName, QListView *view)
qWarning("could not open file");
return;
}
item = (EmailListItem *) view->firstChild();
- qDebug (QString("Write : ") );
+ //qDebug (QString("Write : ") );
QTextStream t(&f);
while (item != NULL) {
mail = item->getMail();
- qDebug(mail->rawMail);
- qDebug(mail->recipients.first());
+ //qDebug(mail->rawMail);
+ //qDebug(mail->recipients.first());
t << mail->rawMail;
mailconf->setGroup(mail->id);
mailconf->writeEntry("mailread", mail->read);
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 9c1c814..03f8a28 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -162,10 +162,8 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
temp = lineShift + "." + lineShift;
if (in.right(temp.length()) != temp) {
- qWarning(in.right(temp.length()));
- qWarning(" . added at end of email as separator");
mail->rawMail += temp;
}
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp
index fd49c1f..2bf1dcb 100644
--- a/noncore/unsupported/mailit/mailitwindow.cpp
+++ b/noncore/unsupported/mailit/mailitwindow.cpp
@@ -26,13 +26,11 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
setCaption(tr(currentCaption));
views = new QWidgetStack(this);
setCentralWidget(views);
- qWarning("***Starting writeMail");
emailClient = new EmailClient(views, "client");
writeMail = new WriteMail(views, "writing");
readMail = new ReadMail(views, "reading");
- qWarning("***Finished readMail");
views->raiseWidget(emailClient);
connect(emailClient, SIGNAL(composeRequested()),
@@ -59,9 +57,8 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
connect(emailClient, SIGNAL(newCaption(const QString &)),
this, SLOT(updateCaption(const QString &)) );
viewingMail = FALSE;
- qWarning("***Finished MailitWindow");
}
MailItWindow::~MailItWindow()
{
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp
index 2f14ed2..f9cc337 100644
--- a/noncore/unsupported/mailit/popclient.cpp
+++ b/noncore/unsupported/mailit/popclient.cpp
@@ -118,9 +118,9 @@ void PopClient::incomingData()
// if ( !socket->canReadLine() )
// return;
response = socket->readLine();
- qDebug(response +" %d", status);
+ //qDebug(response +" %d", status);
switch(status) {
//logging in
case Init: {
@@ -130,9 +130,9 @@ void PopClient::incomingData()
if( start >= 0 && end > start )
{
timeStamp = response.mid( start , end - start + 1);
md5Source = timeStamp + popPassword;
- qDebug( md5Source);
+ //qDebug( md5Source);
// for( int i = 0; i < md5Source.length(); i++) {
// buff[i] = (QChar)md5Source[i];
// }
@@ -191,9 +191,9 @@ void PopClient::incomingData()
if (synchronize) {
//messages deleted from server, reload all
if (newMessages < lastSync)
lastSync = 0;
- messageCount = lastSync + 1;
+ messageCount = 1;
}
if (selected) {
int *ptr = mailList->first();
@@ -239,9 +239,9 @@ void PopClient::incomingData()
emit currentMailSize(mailSize);
status = Retr;
} else {
- qWarning(response);
+ //qWarning(response);
errorHandling(ErrUnknownResponse);
}
}
}
@@ -285,9 +285,9 @@ void PopClient::incomingData()
//complete mail downloaded
if ( (!preview ) || ((preview) && (mailSize <= headerLimit)) ){
emit newMessage(message, messageCount-1, mailSize, TRUE);
} else { //incomplete mail downloaded
- emit newMessage(message, messageCount-1, mailSize, FALSE);
+ emit newMessage(message, messageCount-1, mailSize, FALSE);
}
if (messageCount > newMessages) //that was the last message
status = Quit;
else { //ask for new message
diff --git a/noncore/unsupported/mailit/readmail.cpp b/noncore/unsupported/mailit/readmail.cpp
index a5e7147..7cd3e09 100644
--- a/noncore/unsupported/mailit/readmail.cpp
+++ b/noncore/unsupported/mailit/readmail.cpp
@@ -88,8 +88,9 @@ void ReadMail::init()
viewMenu->insertItem(Resource::loadPixmap("close"), "Close", this, SLOT(close()));
emailView = new QTextView( this, "emailView" );
+
setCentralWidget(emailView);
mime = new QMimeSourceFactory();
emailView->setMimeSourceFactory(mime);
diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp
index 6699a90..b2e38e5 100644
--- a/noncore/unsupported/mailit/smtpclient.cpp
+++ b/noncore/unsupported/mailit/smtpclient.cpp
@@ -86,35 +86,35 @@ void SmtpClient::incomingData()
if (!socket->canReadLine())
return;
response = socket->readLine();
- qDebug(response);
+ //qDebug(response);
switch(status) {
case Init: {
if (response[0] == '2') {
status = From;
mailPtr = mailList.first();
*stream << "HELO there\r\n";
- qDebug("HELO");
+ //qDebug("HELO");
} else errorHandling(ErrUnknownResponse);
break;
}
case From: {
if (response[0] == '2') {
- *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n";
+ *stream << "MAIL FROM: " << mailPtr->from << "\r\n";
status = Recv;
- qDebug("MAIL FROM: "+mailPtr->from);
+ //qDebug("MAIL FROM: "+mailPtr->from);
} else errorHandling(ErrUnknownResponse);
break;
}
case Recv: {
if (response[0] == '2') {
it = mailPtr->to.begin();
if (it == NULL)
errorHandling(ErrUnknownResponse);
- *stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ *stream << "RCPT TO: " << *it << ">\r\n";
+ //qDebug("RCPT TO: "+ *it);
status = MRcv;
} else errorHandling(ErrUnknownResponse);
break;
}
@@ -122,9 +122,9 @@ void SmtpClient::incomingData()
if (response[0] == '2') {
it++;
if ( it != mailPtr->to.end() ) {
*stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ //qDebug("RCPT TO: "+ *it);
break;
} else {
status = Data;
}
@@ -133,9 +133,9 @@ void SmtpClient::incomingData()
case Data: {
if (response[0] == '2') {
*stream << "DATA\r\n";
status = Body;
- qDebug("DATA");
+ //qDebug("DATA");
emit updateStatus(tr("Sending: ") + mailPtr->subject);
} else errorHandling(ErrUnknownResponse);
break;
}
@@ -147,9 +147,9 @@ void SmtpClient::incomingData()
status = From;
} else {
status = Quit;
}
- qDebug("BODY");
+ //qDebug("BODY");
} else errorHandling(ErrUnknownResponse);
break;
}
case Quit: {
@@ -162,9 +162,9 @@ void SmtpClient::incomingData()
emit mailSent();
mailList.clear();
sending = FALSE;
socket->close();
- qDebug("QUIT");
+ //qDebug("QUIT");
} else errorHandling(ErrUnknownResponse);
break;
}
}