Diffstat (limited to 'noncore/net/mailit/emailclient.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mailit/emailclient.cpp | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp index da1226c..749a4e9 100644 --- a/noncore/net/mailit/emailclient.cpp +++ b/noncore/net/mailit/emailclient.cpp @@ -61,6 +61,6 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) - connect(emailHandler, SIGNAL(smtpError(int)), this, - SLOT(smtpError(int)) ); - connect(emailHandler, SIGNAL(popError(int)), this, - SLOT(popError(int)) ); + connect(emailHandler, SIGNAL(smtpError(int,const QString &)), this, + SLOT(smtpError(int,const QString &)) ); + connect(emailHandler, SIGNAL(popError(int,const QString &)), this, + SLOT(popError(int,const QString &)) ); @@ -482,3 +482,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) -void EmailClient::allMailArrived(int count) +void EmailClient::allMailArrived(int /*count*/) { @@ -520,3 +520,3 @@ void EmailClient::moveMailFront(Email *mailPtr) -void EmailClient::smtpError(int code) +void EmailClient::smtpError(int code, const QString & Msg) { @@ -524,11 +524,13 @@ void EmailClient::smtpError(int code) - if (code == ErrUnknownResponse) - temp = "Unknown response from server"; - - if (code == QSocket::ErrHostNotFound) - temp = "host not found"; - if (code == QSocket::ErrConnectionRefused) - temp = "connection refused"; - if (code == QSocket::ErrSocketRead) - temp = "socket packet error"; + if (code == ErrUnknownResponse) { + temp = tr("<qt>Unknown response from server</qt>"); + if( ! Msg.isEmpty() ) + temp += Msg; + } else if (code == QSocket::ErrHostNotFound) { + temp = tr("<qt>host not found</qt>"); + } else if (code == QSocket::ErrConnectionRefused) { + temp = tr("<qt>connection refused</qt>"); + } else if (code == QSocket::ErrSocketRead) { + temp = tr("<qt>socket packet error</qt>"); + } @@ -546,3 +548,3 @@ void EmailClient::smtpError(int code) -void EmailClient::popError(int code) +void EmailClient::popError(int code, const QString & Msg) { @@ -550,16 +552,19 @@ void EmailClient::popError(int code) - if (code == ErrUnknownResponse) - temp = "Unknown response from server"; - if (code == ErrLoginFailed) - temp = "Login failed\nCheck user name and password"; - - if (code == QSocket::ErrHostNotFound) - temp = "host not found"; - if (code == QSocket::ErrConnectionRefused) - temp = "connection refused"; - if (code == QSocket::ErrSocketRead) - temp = "socket packet error"; + if (code == ErrUnknownResponse) { + temp = tr("<qt>Unknown response from server</qt>"); + if( ! Msg.isEmpty() ) + temp += Msg; + } else if (code == ErrLoginFailed) { + temp = tr("<qt>Login failed\nCheck user name and password</qt>"); + } else if (code == QSocket::ErrHostNotFound) { + temp = tr("<qt>host not found</qt>"); + } else if (code == QSocket::ErrConnectionRefused) { + temp = tr("<qt>connection refused</qt>"); + } else if (code == QSocket::ErrSocketRead) { + temp = tr("<qt>socket packet error</qt>"); + } if (code != ErrCancel) { - QMessageBox::warning(qApp->activeWindow(), "Receiving error", temp, "OK\n"); + QMessageBox::warning(qApp->activeWindow(), tr("Receiving error"), temp, tr("OK\n")); + } else { @@ -900,3 +905,3 @@ void EmailClient::setMailSize(int size) -void EmailClient::setTotalSize(int size) +void EmailClient::setTotalSize(int /*size*/) { @@ -922,3 +927,3 @@ void EmailClient::deleteItem() EmailListItem* eli; - int pos; + // int pos; @@ -948,3 +953,3 @@ void EmailClient::inboxItemReleased() { - /*killTimer(timerID); + //killTimer(timerID); @@ -993,3 +998,3 @@ void EmailClient::download(Email* mail) -void EmailClient::receive(const QCString& msg, const QByteArray& data) +void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/) { @@ -997,3 +1002,3 @@ void EmailClient::receive(const QCString& msg, const QByteArray& data) { - /*QDialog qd(qApp->activeWindow(),"Getting mail",true); + //QDialog qd(qApp->activeWindow(),"Getting mail",true); QVBoxLayout *vbProg = new QVBoxLayout( &qd ); |