summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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.cpp8
-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.cpp8
-rw-r--r--noncore/unsupported/mailit/readmail.cpp1
-rw-r--r--noncore/unsupported/mailit/smtpclient.cpp20
14 files changed, 40 insertions, 48 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
@@ -124,13 +124,13 @@ void AddressList::read()
//OContact* oc;
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;
QTextStream stream(&f);
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
@@ -529,13 +529,13 @@ void EmailClient::readMail()
Email mail;
int start, stop;
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();
f.close();
@@ -583,18 +583,18 @@ void EmailClient::saveMail(QString fileName, QListView *view)
if (! f.open(IO_WriteOnly) ) {
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);
item = (EmailListItem *) item->nextSibling();
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
@@ -160,14 +160,12 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
mail->received = TRUE;
mail->files.setAutoDelete(TRUE);
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;
}
delimiter = lineShift + lineShift; // "\n\n" or "\r\n\r\n"
pos = in.find(delimiter, 0, FALSE);
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
@@ -24,17 +24,15 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
{
currentCaption = "Mailit";
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()),
this, SLOT(compose()) );
connect(emailClient, SIGNAL(viewEmail(QListView *, Email *)), this,
@@ -57,13 +55,12 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
SLOT(moveMailFront(Email *)) );
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
@@ -116,25 +116,25 @@ void PopClient::incomingData()
// char *md5Digest;
char md5Digest[16];
// if ( !socket->canReadLine() )
// return;
response = socket->readLine();
- qDebug(response +" %d", status);
+ //qDebug(response +" %d", status);
switch(status) {
//logging in
case Init: {
#ifdef APOP_TEST
start = response.find('<',0);
end = response.find('>', start);
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];
// }
md5_buffer( (char const *)md5Source, md5Source.length(),&md5Digest[0]);
// md5_buffer(char const *buffer, unsigned int len, char *digest);
@@ -189,13 +189,13 @@ void PopClient::incomingData()
status = List;
if (synchronize) {
//messages deleted from server, reload all
if (newMessages < lastSync)
lastSync = 0;
- messageCount = lastSync + 1;
+ messageCount = 1;
}
if (selected) {
int *ptr = mailList->first();
if (ptr != 0) {
newMessages++; //to ensure no early jumpout
@@ -237,13 +237,13 @@ void PopClient::incomingData()
temp = temp.right(temp.length() - ((uint) x + 1) );
mailSize = temp.toInt();
emit currentMailSize(mailSize);
status = Retr;
} else {
- qWarning(response);
+ //qWarning(response);
errorHandling(ErrUnknownResponse);
}
}
}
//Read message number x, count upwards to messageCount
case Retr: {
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
@@ -86,12 +86,13 @@ void ReadMail::init()
deleteButton->addTo(bar);
deleteButton->addTo(mailMenu);
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
@@ -84,60 +84,60 @@ void SmtpClient::incomingData()
QString response;
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;
}
case MRcv: {
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;
}
} else errorHandling(ErrUnknownResponse);
}
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;
}
case Body: {
if (response[0] == '3') {
@@ -145,13 +145,13 @@ void SmtpClient::incomingData()
mailPtr = mailList.next();
if (mailPtr != NULL) {
status = From;
} else {
status = Quit;
}
- qDebug("BODY");
+ //qDebug("BODY");
} else errorHandling(ErrUnknownResponse);
break;
}
case Quit: {
if (response[0] == '2') {
*stream << "QUIT\r\n";
@@ -160,12 +160,12 @@ void SmtpClient::incomingData()
temp.setNum(mailList.count());
emit updateStatus(tr("Sent ") + temp + tr(" messages"));
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
@@ -124,13 +124,13 @@ void AddressList::read()
//OContact* oc;
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;
QTextStream stream(&f);
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
@@ -529,13 +529,13 @@ void EmailClient::readMail()
Email mail;
int start, stop;
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();
f.close();
@@ -583,18 +583,18 @@ void EmailClient::saveMail(QString fileName, QListView *view)
if (! f.open(IO_WriteOnly) ) {
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);
item = (EmailListItem *) item->nextSibling();
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
@@ -160,14 +160,12 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
mail->received = TRUE;
mail->files.setAutoDelete(TRUE);
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;
}
delimiter = lineShift + lineShift; // "\n\n" or "\r\n\r\n"
pos = in.find(delimiter, 0, FALSE);
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
@@ -24,17 +24,15 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
{
currentCaption = "Mailit";
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()),
this, SLOT(compose()) );
connect(emailClient, SIGNAL(viewEmail(QListView *, Email *)), this,
@@ -57,13 +55,12 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
SLOT(moveMailFront(Email *)) );
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
@@ -116,25 +116,25 @@ void PopClient::incomingData()
// char *md5Digest;
char md5Digest[16];
// if ( !socket->canReadLine() )
// return;
response = socket->readLine();
- qDebug(response +" %d", status);
+ //qDebug(response +" %d", status);
switch(status) {
//logging in
case Init: {
#ifdef APOP_TEST
start = response.find('<',0);
end = response.find('>', start);
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];
// }
md5_buffer( (char const *)md5Source, md5Source.length(),&md5Digest[0]);
// md5_buffer(char const *buffer, unsigned int len, char *digest);
@@ -189,13 +189,13 @@ void PopClient::incomingData()
status = List;
if (synchronize) {
//messages deleted from server, reload all
if (newMessages < lastSync)
lastSync = 0;
- messageCount = lastSync + 1;
+ messageCount = 1;
}
if (selected) {
int *ptr = mailList->first();
if (ptr != 0) {
newMessages++; //to ensure no early jumpout
@@ -237,13 +237,13 @@ void PopClient::incomingData()
temp = temp.right(temp.length() - ((uint) x + 1) );
mailSize = temp.toInt();
emit currentMailSize(mailSize);
status = Retr;
} else {
- qWarning(response);
+ //qWarning(response);
errorHandling(ErrUnknownResponse);
}
}
}
//Read message number x, count upwards to messageCount
case Retr: {
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
@@ -86,12 +86,13 @@ void ReadMail::init()
deleteButton->addTo(bar);
deleteButton->addTo(mailMenu);
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
@@ -84,60 +84,60 @@ void SmtpClient::incomingData()
QString response;
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;
}
case MRcv: {
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;
}
} else errorHandling(ErrUnknownResponse);
}
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;
}
case Body: {
if (response[0] == '3') {
@@ -145,13 +145,13 @@ void SmtpClient::incomingData()
mailPtr = mailList.next();
if (mailPtr != NULL) {
status = From;
} else {
status = Quit;
}
- qDebug("BODY");
+ //qDebug("BODY");
} else errorHandling(ErrUnknownResponse);
break;
}
case Quit: {
if (response[0] == '2') {
*stream << "QUIT\r\n";
@@ -160,12 +160,12 @@ void SmtpClient::incomingData()
temp.setNum(mailList.count());
emit updateStatus(tr("Sent ") + temp + tr(" messages"));
emit mailSent();
mailList.clear();
sending = FALSE;
socket->close();
- qDebug("QUIT");
+ //qDebug("QUIT");
} else errorHandling(ErrUnknownResponse);
break;
}
}
}