From 364e6e65b4c3b4ceec2b1b6688f2ca2b3dce4560 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Mon, 09 Jun 2003 01:37:23 +0000 Subject: patch from wim delvaux. fix from me --- (limited to 'noncore/unsupported/mailit/emailclient.cpp') 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 @@ -59,10 +59,10 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); - 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 &)) ); connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) ); connect(outboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(outboxItemSelected()) ); @@ -480,7 +480,7 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) } -void EmailClient::allMailArrived(int count) +void EmailClient::allMailArrived(int /*count*/) { // not previewing means all mailtransfer has been done /*if (!previewingMail) {*/ @@ -518,19 +518,21 @@ void EmailClient::moveMailFront(Email *mailPtr) } } -void EmailClient::smtpError(int code) +void EmailClient::smtpError(int code, const QString & Msg) { QString temp; - 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("Unknown response from server"); + if( ! Msg.isEmpty() ) + temp += Msg; + } else if (code == QSocket::ErrHostNotFound) { + temp = tr("host not found"); + } else if (code == QSocket::ErrConnectionRefused) { + temp = tr("connection refused"); + } else if (code == QSocket::ErrSocketRead) { + temp = tr("socket packet error"); + } if (code != ErrCancel) { QMessageBox::warning(qApp->activeWindow(), "Sending error", temp, "OK\n"); @@ -544,24 +546,27 @@ void EmailClient::smtpError(int code) quedMessages.clear(); } -void EmailClient::popError(int code) +void EmailClient::popError(int code, const QString & Msg) { QString temp; - 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("Unknown response from server"); + if( ! Msg.isEmpty() ) + temp += Msg; + } else if (code == ErrLoginFailed) { + temp = tr("Login failed\nCheck user name and password"); + } else if (code == QSocket::ErrHostNotFound) { + temp = tr("host not found"); + } else if (code == QSocket::ErrConnectionRefused) { + temp = tr("connection refused"); + } else if (code == QSocket::ErrSocketRead) { + temp = tr("socket packet error"); + } + if (code != ErrCancel) { - QMessageBox::warning(qApp->activeWindow(), "Receiving error", temp, "OK\n"); + QMessageBox::warning(qApp->activeWindow(), tr("Receiving error"), temp, tr("OK\n")); + } else { status2Label->setText("Aborted by user"); } @@ -898,7 +903,7 @@ void EmailClient::setMailSize(int size) progressBar->setTotalSteps(size); } -void EmailClient::setTotalSize(int size) +void EmailClient::setTotalSize(int /*size*/) { } @@ -920,7 +925,7 @@ void EmailClient::deleteItem() QListView* box; EmailListItem* eli; - int pos; + // int pos; inbox ? box=inboxView : box=outboxView; @@ -946,7 +951,7 @@ void EmailClient::inboxItemReleased() /*void EmailClient::timerEvent(QTimerEvent *e) { - /*killTimer(timerID); + //killTimer(timerID); QPopupMenu *action = new QPopupMenu(this); @@ -991,11 +996,11 @@ void EmailClient::download(Email* mail) tr("No account associated"), tr("There is no active account \nassociated to this mail\n it can not be downloaded"), "Abort\n"); } -void EmailClient::receive(const QCString& msg, const QByteArray& data) +void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/) { /*if (msg=="getMail()") { - /*QDialog qd(qApp->activeWindow(),"Getting mail",true); + //QDialog qd(qApp->activeWindow(),"Getting mail",true); QVBoxLayout *vbProg = new QVBoxLayout( &qd ); initStatusBar(&qd); -- cgit v0.9.0.2