summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailclient.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/emailclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp73
1 files changed, 39 insertions, 34 deletions
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index da1226c..749a4e9 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -61,6 +61,6 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
61 61
62 connect(emailHandler, SIGNAL(smtpError(int)), this, 62 connect(emailHandler, SIGNAL(smtpError(int,const QString &)), this,
63 SLOT(smtpError(int)) ); 63 SLOT(smtpError(int,const QString &)) );
64 connect(emailHandler, SIGNAL(popError(int)), this, 64 connect(emailHandler, SIGNAL(popError(int,const QString &)), this,
65 SLOT(popError(int)) ); 65 SLOT(popError(int,const QString &)) );
66 66
@@ -482,3 +482,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
482 482
483void EmailClient::allMailArrived(int count) 483void EmailClient::allMailArrived(int /*count*/)
484{ 484{
@@ -520,3 +520,3 @@ void EmailClient::moveMailFront(Email *mailPtr)
520 520
521void EmailClient::smtpError(int code) 521void EmailClient::smtpError(int code, const QString & Msg)
522{ 522{
@@ -524,11 +524,13 @@ void EmailClient::smtpError(int code)
524 524
525 if (code == ErrUnknownResponse) 525 if (code == ErrUnknownResponse) {
526 temp = "Unknown response from server"; 526 temp = tr("<qt>Unknown response from server</qt>");
527 527 if( ! Msg.isEmpty() )
528 if (code == QSocket::ErrHostNotFound) 528 temp += Msg;
529 temp = "host not found"; 529 } else if (code == QSocket::ErrHostNotFound) {
530 if (code == QSocket::ErrConnectionRefused) 530 temp = tr("<qt>host not found</qt>");
531 temp = "connection refused"; 531 } else if (code == QSocket::ErrConnectionRefused) {
532 if (code == QSocket::ErrSocketRead) 532 temp = tr("<qt>connection refused</qt>");
533 temp = "socket packet error"; 533 } else if (code == QSocket::ErrSocketRead) {
534 temp = tr("<qt>socket packet error</qt>");
535 }
534 536
@@ -546,3 +548,3 @@ void EmailClient::smtpError(int code)
546 548
547void EmailClient::popError(int code) 549void EmailClient::popError(int code, const QString & Msg)
548{ 550{
@@ -550,16 +552,19 @@ void EmailClient::popError(int code)
550 552
551 if (code == ErrUnknownResponse) 553 if (code == ErrUnknownResponse) {
552 temp = "Unknown response from server"; 554 temp = tr("<qt>Unknown response from server</qt>");
553 if (code == ErrLoginFailed) 555 if( ! Msg.isEmpty() )
554 temp = "Login failed\nCheck user name and password"; 556 temp += Msg;
555 557 } else if (code == ErrLoginFailed) {
556 if (code == QSocket::ErrHostNotFound) 558 temp = tr("<qt>Login failed\nCheck user name and password</qt>");
557 temp = "host not found"; 559 } else if (code == QSocket::ErrHostNotFound) {
558 if (code == QSocket::ErrConnectionRefused) 560 temp = tr("<qt>host not found</qt>");
559 temp = "connection refused"; 561 } else if (code == QSocket::ErrConnectionRefused) {
560 if (code == QSocket::ErrSocketRead) 562 temp = tr("<qt>connection refused</qt>");
561 temp = "socket packet error"; 563 } else if (code == QSocket::ErrSocketRead) {
562 564 temp = tr("<qt>socket packet error</qt>");
565 }
566
563 if (code != ErrCancel) { 567 if (code != ErrCancel) {
564 QMessageBox::warning(qApp->activeWindow(), "Receiving error", temp, "OK\n"); 568 QMessageBox::warning(qApp->activeWindow(), tr("Receiving error"), temp, tr("OK\n"));
569
565 } else { 570 } else {
@@ -900,3 +905,3 @@ void EmailClient::setMailSize(int size)
900 905
901void EmailClient::setTotalSize(int size) 906void EmailClient::setTotalSize(int /*size*/)
902{ 907{
@@ -922,3 +927,3 @@ void EmailClient::deleteItem()
922 EmailListItem* eli; 927 EmailListItem* eli;
923 int pos; 928 // int pos;
924 929
@@ -948,3 +953,3 @@ void EmailClient::inboxItemReleased()
948{ 953{
949 /*killTimer(timerID); 954 //killTimer(timerID);
950 955
@@ -993,3 +998,3 @@ void EmailClient::download(Email* mail)
993 998
994void EmailClient::receive(const QCString& msg, const QByteArray& data) 999void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/)
995{ 1000{
@@ -997,3 +1002,3 @@ void EmailClient::receive(const QCString& msg, const QByteArray& data)
997 { 1002 {
998 /*QDialog qd(qApp->activeWindow(),"Getting mail",true); 1003 //QDialog qd(qApp->activeWindow(),"Getting mail",true);
999 QVBoxLayout *vbProg = new QVBoxLayout( &qd ); 1004 QVBoxLayout *vbProg = new QVBoxLayout( &qd );