summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailclient.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mailit/emailclient.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp71
1 files changed, 38 insertions, 33 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
@@ -60,8 +60,8 @@ 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()) );
@@ -481,5 +481,5 @@ 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
@@ -519,17 +519,19 @@ 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("<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>");
+ }
if (code != ErrCancel) {
@@ -545,22 +547,25 @@ void EmailClient::smtpError(int code)
}
-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("<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 {
status2Label->setText("Aborted by user");
@@ -899,5 +904,5 @@ void EmailClient::setMailSize(int size)
}
-void EmailClient::setTotalSize(int size)
+void EmailClient::setTotalSize(int /*size*/)
{
@@ -921,5 +926,5 @@ void EmailClient::deleteItem()
EmailListItem* eli;
- int pos;
+ // int pos;
inbox ? box=inboxView : box=outboxView;
@@ -947,5 +952,5 @@ void EmailClient::inboxItemReleased()
/*void EmailClient::timerEvent(QTimerEvent *e)
{
- /*killTimer(timerID);
+ //killTimer(timerID);
@@ -992,9 +997,9 @@ void EmailClient::download(Email* mail)
}
-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 );