28 files changed, 200 insertions, 162 deletions
diff --git a/noncore/net/mailit/addatt.cpp b/noncore/net/mailit/addatt.cpp index daefac6..19ac58f 100644 --- a/noncore/net/mailit/addatt.cpp +++ b/noncore/net/mailit/addatt.cpp | |||
@@ -57,5 +57,5 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f) | |||
57 | : QDialog(parent, name, f) | 57 | : QDialog(parent, name, f) |
58 | { | 58 | { |
59 | setCaption("Adding attachments"); | 59 | setCaption(tr("Adding attachments") ); |
60 | 60 | ||
61 | QGridLayout *top = new QGridLayout(this, 1,1 ); | 61 | QGridLayout *top = new QGridLayout(this, 1,1 ); |
@@ -123,5 +123,5 @@ void AddAtt::clear() | |||
123 | 123 | ||
124 | void AddAtt::addattachment() | 124 | void AddAtt::addattachment() |
125 | { | 125 | {// ### FIXME wrong use -zecke |
126 | OFileDialog ofs("Attachments",this,0,0,"/root/Documents"); | 126 | OFileDialog ofs("Attachments",this,0,0,"/root/Documents"); |
127 | 127 | ||
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 | |||
@@ -60,8 +60,8 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) | |||
60 | connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); | 60 | connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); |
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 | ||
67 | connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) ); | 67 | connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) ); |
@@ -481,5 +481,5 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
481 | } | 481 | } |
482 | 482 | ||
483 | void EmailClient::allMailArrived(int count) | 483 | void EmailClient::allMailArrived(int /*count*/) |
484 | { | 484 | { |
485 | // not previewing means all mailtransfer has been done | 485 | // not previewing means all mailtransfer has been done |
@@ -519,17 +519,19 @@ void EmailClient::moveMailFront(Email *mailPtr) | |||
519 | } | 519 | } |
520 | 520 | ||
521 | void EmailClient::smtpError(int code) | 521 | void EmailClient::smtpError(int code, const QString & Msg) |
522 | { | 522 | { |
523 | QString temp; | 523 | QString temp; |
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 | ||
535 | if (code != ErrCancel) { | 537 | if (code != ErrCancel) { |
@@ -545,22 +547,25 @@ void EmailClient::smtpError(int code) | |||
545 | } | 547 | } |
546 | 548 | ||
547 | void EmailClient::popError(int code) | 549 | void EmailClient::popError(int code, const QString & Msg) |
548 | { | 550 | { |
549 | QString temp; | 551 | QString temp; |
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) { |
564 | temp = tr("<qt>socket packet error</qt>"); | ||
565 | } | ||
562 | 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 { |
566 | status2Label->setText("Aborted by user"); | 571 | status2Label->setText("Aborted by user"); |
@@ -899,5 +904,5 @@ void EmailClient::setMailSize(int size) | |||
899 | } | 904 | } |
900 | 905 | ||
901 | void EmailClient::setTotalSize(int size) | 906 | void EmailClient::setTotalSize(int /*size*/) |
902 | { | 907 | { |
903 | 908 | ||
@@ -921,5 +926,5 @@ void EmailClient::deleteItem() | |||
921 | 926 | ||
922 | EmailListItem* eli; | 927 | EmailListItem* eli; |
923 | int pos; | 928 | // int pos; |
924 | 929 | ||
925 | inbox ? box=inboxView : box=outboxView; | 930 | inbox ? box=inboxView : box=outboxView; |
@@ -947,5 +952,5 @@ void EmailClient::inboxItemReleased() | |||
947 | /*void EmailClient::timerEvent(QTimerEvent *e) | 952 | /*void EmailClient::timerEvent(QTimerEvent *e) |
948 | { | 953 | { |
949 | /*killTimer(timerID); | 954 | //killTimer(timerID); |
950 | 955 | ||
951 | 956 | ||
@@ -992,9 +997,9 @@ void EmailClient::download(Email* mail) | |||
992 | } | 997 | } |
993 | 998 | ||
994 | void EmailClient::receive(const QCString& msg, const QByteArray& data) | 999 | void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/) |
995 | { | 1000 | { |
996 | /*if (msg=="getMail()") | 1001 | /*if (msg=="getMail()") |
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 ); |
1000 | 1005 | ||
diff --git a/noncore/net/mailit/emailclient.h b/noncore/net/mailit/emailclient.h index c98cfce..80c6d31 100644 --- a/noncore/net/mailit/emailclient.h +++ b/noncore/net/mailit/emailclient.h | |||
@@ -99,6 +99,6 @@ public slots: | |||
99 | void getNewMail(); | 99 | void getNewMail(); |
100 | void getAllNewMail(); | 100 | void getAllNewMail(); |
101 | void smtpError(int code); | 101 | void smtpError(int code, const QString & Msg ); |
102 | void popError(int code); | 102 | void popError(int code, const QString & Msg); |
103 | void inboxItemSelected(); | 103 | void inboxItemSelected(); |
104 | void outboxItemSelected(); | 104 | void outboxItemSelected(); |
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp index 39f693d..5b8bda1 100644 --- a/noncore/net/mailit/emailhandler.cpp +++ b/noncore/net/mailit/emailhandler.cpp | |||
@@ -45,12 +45,12 @@ EmailHandler::EmailHandler() | |||
45 | popClient = new PopClient(); | 45 | popClient = new PopClient(); |
46 | 46 | ||
47 | connect(smtpClient, SIGNAL(errorOccurred(int)), this, | 47 | connect(smtpClient, SIGNAL(errorOccurred(int, const QString &)), this, |
48 | SIGNAL(smtpError(int)) ); | 48 | SIGNAL(smtpError(int, const QString &)) ); |
49 | connect(smtpClient, SIGNAL(mailSent()), this, SIGNAL(mailSent()) ); | 49 | connect(smtpClient, SIGNAL(mailSent()), this, SIGNAL(mailSent()) ); |
50 | connect(smtpClient, SIGNAL(updateStatus(const QString &)), this, | 50 | connect(smtpClient, SIGNAL(updateStatus(const QString &)), this, |
51 | SIGNAL(updateSmtpStatus(const QString &)) ); | 51 | SIGNAL(updateSmtpStatus(const QString &)) ); |
52 | 52 | ||
53 | connect(popClient, SIGNAL(errorOccurred(int)), this, | 53 | connect(popClient, SIGNAL(errorOccurred(int, const QString &)), this, |
54 | SIGNAL(popError(int)) ); | 54 | SIGNAL(popError(int, const QString &)) ); |
55 | connect(popClient, SIGNAL(newMessage(const QString &, int, uint, bool)), | 55 | connect(popClient, SIGNAL(newMessage(const QString &, int, uint, bool)), |
56 | this, SLOT(messageArrived(const QString &, int, uint, bool)) ); | 56 | this, SLOT(messageArrived(const QString &, int, uint, bool)) ); |
diff --git a/noncore/net/mailit/emailhandler.h b/noncore/net/mailit/emailhandler.h index e4e7f46..74a8e4c 100644 --- a/noncore/net/mailit/emailhandler.h +++ b/noncore/net/mailit/emailhandler.h | |||
@@ -128,6 +128,6 @@ public: | |||
128 | signals: | 128 | signals: |
129 | void mailSent(); | 129 | void mailSent(); |
130 | void smtpError(int); | 130 | void smtpError(int, const QString & Msg ); |
131 | void popError(int); | 131 | void popError(int, const QString & Msg ); |
132 | void mailArrived(const Email &, bool); | 132 | void mailArrived(const Email &, bool); |
133 | void updatePopStatus(const QString &); | 133 | void updatePopStatus(const QString &); |
diff --git a/noncore/net/mailit/mailit.pro b/noncore/net/mailit/mailit.pro index cfbda36..5e9a83a 100644 --- a/noncore/net/mailit/mailit.pro +++ b/noncore/net/mailit/mailit.pro | |||
@@ -1,3 +1,4 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | TARGET = mailit | ||
2 | CONFIG = qt warn_on release | 3 | CONFIG = qt warn_on release |
3 | HEADERS = emailclient.h \ | 4 | HEADERS = emailclient.h \ |
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp index f945a0f..6e298c7 100644 --- a/noncore/net/mailit/mailitwindow.cpp +++ b/noncore/net/mailit/mailitwindow.cpp | |||
@@ -22,8 +22,8 @@ | |||
22 | #include "mailitwindow.h" | 22 | #include "mailitwindow.h" |
23 | 23 | ||
24 | MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl) | 24 | MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags /*fl*/) |
25 | : QMainWindow(parent, name, WStyle_ContextHelp) | 25 | : QMainWindow(parent, name, WStyle_ContextHelp) |
26 | { | 26 | { |
27 | currentCaption = "Mailit"; | 27 | currentCaption = tr("Mailit"); |
28 | setCaption(tr(currentCaption)); | 28 | setCaption(tr(currentCaption)); |
29 | views = new QWidgetStack(this); | 29 | views = new QWidgetStack(this); |
diff --git a/noncore/net/mailit/maillist.cpp b/noncore/net/mailit/maillist.cpp index b5325a9..8c34295 100644 --- a/noncore/net/mailit/maillist.cpp +++ b/noncore/net/mailit/maillist.cpp | |||
@@ -75,5 +75,5 @@ void MailList::sizeInsert(int serverId, uint size) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | void MailList::moveFront(int serverId, uint size) | 77 | void MailList::moveFront(int serverId, uint/* size*/) |
78 | { | 78 | { |
79 | dList *currentPtr; | 79 | dList *currentPtr; |
@@ -101,5 +101,5 @@ void MailList::moveFront(int serverId, uint size) | |||
101 | 101 | ||
102 | //only works if mail is not already in download | 102 | //only works if mail is not already in download |
103 | bool MailList::remove(int serverId, uint size) | 103 | bool MailList::remove(int serverId, uint /*size*/) |
104 | { | 104 | { |
105 | dList *currentPtr; | 105 | dList *currentPtr; |
@@ -126,5 +126,5 @@ bool MailList::remove(int serverId, uint size) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | void MailList::insert(int pos, int serverId, uint size) | 128 | void MailList::insert(int /*pos*/, int /*serverId*/, uint/* size*/) |
129 | { | 129 | { |
130 | //sortedList.insert(pos, mPtr); | 130 | //sortedList.insert(pos, mPtr); |
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp index dc0116d..5da3bcb 100644 --- a/noncore/net/mailit/popclient.cpp +++ b/noncore/net/mailit/popclient.cpp | |||
@@ -64,5 +64,5 @@ void PopClient::newConnection(const QString &target, int port) | |||
64 | //selected = FALSE; | 64 | //selected = FALSE; |
65 | 65 | ||
66 | emit updateStatus("DNS lookup"); | 66 | emit updateStatus(tr("DNS lookup")); |
67 | } | 67 | } |
68 | 68 | ||
@@ -104,6 +104,10 @@ void PopClient::connectionEstablished() | |||
104 | void PopClient::errorHandling(int status) | 104 | void PopClient::errorHandling(int status) |
105 | { | 105 | { |
106 | errorHandlingWithMsg( status, QString::null ); | ||
107 | } | ||
108 | void PopClient::errorHandlingWithMsg(int status, const QString & Msg ) | ||
109 | { | ||
106 | emit updateStatus(tr("Error Occured")); | 110 | emit updateStatus(tr("Error Occured")); |
107 | emit errorOccurred(status); | 111 | emit errorOccurred(status, Msg); |
108 | socket->close(); | 112 | socket->close(); |
109 | receiving = FALSE; | 113 | receiving = FALSE; |
@@ -168,5 +172,5 @@ void PopClient::incomingData() | |||
168 | *stream << "STAT" << "\r\n"; | 172 | *stream << "STAT" << "\r\n"; |
169 | status = Mcnt; | 173 | status = Mcnt; |
170 | } else errorHandling(ErrLoginFailed); | 174 | } else errorHandlingWithMsg(ErrLoginFailed, response); |
171 | break; | 175 | break; |
172 | } | 176 | } |
@@ -196,5 +200,5 @@ void PopClient::incomingData() | |||
196 | } | 200 | } |
197 | 201 | ||
198 | } else errorHandling(ErrUnknownResponse); | 202 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
199 | } | 203 | } |
200 | //Read message number x, count upwards to messageCount | 204 | //Read message number x, count upwards to messageCount |
@@ -235,5 +239,5 @@ void PopClient::incomingData() | |||
235 | } else { | 239 | } else { |
236 | //qWarning(response); | 240 | //qWarning(response); |
237 | errorHandling(ErrUnknownResponse); | 241 | errorHandlingWithMsg(ErrUnknownResponse, response); |
238 | } | 242 | } |
239 | } | 243 | } |
@@ -260,5 +264,5 @@ void PopClient::incomingData() | |||
260 | break; | 264 | break; |
261 | response = socket->readLine(); | 265 | response = socket->readLine(); |
262 | } else errorHandling(ErrUnknownResponse); | 266 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
263 | } | 267 | } |
264 | } | 268 | } |
diff --git a/noncore/net/mailit/popclient.h b/noncore/net/mailit/popclient.h index c58bc48..6774ceb 100644 --- a/noncore/net/mailit/popclient.h +++ b/noncore/net/mailit/popclient.h | |||
@@ -45,5 +45,5 @@ public: | |||
45 | signals: | 45 | signals: |
46 | void newMessage(const QString &, int, uint, bool); | 46 | void newMessage(const QString &, int, uint, bool); |
47 | void errorOccurred(int status); | 47 | void errorOccurred(int status, const QString & Msg ); |
48 | void updateStatus(const QString &); | 48 | void updateStatus(const QString &); |
49 | void mailTransfered(int); | 49 | void mailTransfered(int); |
@@ -54,4 +54,5 @@ signals: | |||
54 | public slots: | 54 | public slots: |
55 | void errorHandling(int); | 55 | void errorHandling(int); |
56 | void errorHandlingWithMsg(int, const QString & ); | ||
56 | 57 | ||
57 | protected slots: | 58 | protected slots: |
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp index 2916f45..5b5ef52 100644 --- a/noncore/net/mailit/smtpclient.cpp +++ b/noncore/net/mailit/smtpclient.cpp | |||
@@ -74,5 +74,10 @@ void SmtpClient::connectionEstablished() | |||
74 | void SmtpClient::errorHandling(int status) | 74 | void SmtpClient::errorHandling(int status) |
75 | { | 75 | { |
76 | emit errorOccurred(status); | 76 | errorHandlingWithMsg( status, QString::null ); |
77 | } | ||
78 | |||
79 | void SmtpClient::errorHandlingWithMsg(int status, const QString & EMsg ) | ||
80 | { | ||
81 | emit errorOccurred(status, EMsg ); | ||
77 | socket->close(); | 82 | socket->close(); |
78 | mailList.clear(); | 83 | mailList.clear(); |
@@ -88,5 +93,4 @@ void SmtpClient::incomingData() | |||
88 | 93 | ||
89 | response = socket->readLine(); | 94 | response = socket->readLine(); |
90 | |||
91 | switch(status) { | 95 | switch(status) { |
92 | case Init: { | 96 | case Init: { |
@@ -95,12 +99,13 @@ void SmtpClient::incomingData() | |||
95 | mailPtr = mailList.first(); | 99 | mailPtr = mailList.first(); |
96 | *stream << "HELO there\r\n"; | 100 | *stream << "HELO there\r\n"; |
97 | } else errorHandling(ErrUnknownResponse); | 101 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
98 | break; | 102 | break; |
99 | } | 103 | } |
100 | case From: { | 104 | case From: { |
101 | if (response[0] == '2') { | 105 | if (response[0] == '2') { |
102 | *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; | 106 | qDebug(mailPtr->from); |
107 | *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; | ||
103 | status = Recv; | 108 | status = Recv; |
104 | } else errorHandling(ErrUnknownResponse); | 109 | } else errorHandlingWithMsg(ErrUnknownResponse, response ); |
105 | break; | 110 | break; |
106 | } | 111 | } |
@@ -108,9 +113,10 @@ void SmtpClient::incomingData() | |||
108 | if (response[0] == '2') { | 113 | if (response[0] == '2') { |
109 | it = mailPtr->to.begin(); | 114 | it = mailPtr->to.begin(); |
110 | if (it == NULL) | 115 | if (it == NULL) { |
111 | errorHandling(ErrUnknownResponse); | 116 | errorHandlingWithMsg(ErrUnknownResponse,response); |
112 | *stream << "RCPT TO: " << *it << ">\r\n"; | 117 | } |
118 | *stream << "RCPT TO: <" << *it << ">\r\n"; | ||
113 | status = MRcv; | 119 | status = MRcv; |
114 | } else errorHandling(ErrUnknownResponse); | 120 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
115 | break; | 121 | break; |
116 | } | 122 | } |
@@ -124,5 +130,5 @@ void SmtpClient::incomingData() | |||
124 | status = Data; | 130 | status = Data; |
125 | } | 131 | } |
126 | } else errorHandling(ErrUnknownResponse); | 132 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
127 | } | 133 | } |
128 | case Data: { | 134 | case Data: { |
@@ -131,5 +137,6 @@ void SmtpClient::incomingData() | |||
131 | status = Body; | 137 | status = Body; |
132 | emit updateStatus(tr("Sending: ") + mailPtr->subject); | 138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); |
133 | } else errorHandling(ErrUnknownResponse); | 139 | |
140 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | ||
134 | break; | 141 | break; |
135 | } | 142 | } |
@@ -143,5 +150,5 @@ void SmtpClient::incomingData() | |||
143 | status = Quit; | 150 | status = Quit; |
144 | } | 151 | } |
145 | } else errorHandling(ErrUnknownResponse); | 152 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
146 | break; | 153 | break; |
147 | } | 154 | } |
@@ -157,5 +164,5 @@ void SmtpClient::incomingData() | |||
157 | sending = FALSE; | 164 | sending = FALSE; |
158 | socket->close(); | 165 | socket->close(); |
159 | } else errorHandling(ErrUnknownResponse); | 166 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
160 | break; | 167 | break; |
161 | } | 168 | } |
diff --git a/noncore/net/mailit/smtpclient.h b/noncore/net/mailit/smtpclient.h index 45c0703..554ba3f 100644 --- a/noncore/net/mailit/smtpclient.h +++ b/noncore/net/mailit/smtpclient.h | |||
@@ -48,5 +48,5 @@ public: | |||
48 | 48 | ||
49 | signals: | 49 | signals: |
50 | void errorOccurred(int); | 50 | void errorOccurred(int, const QString & LR ); |
51 | void updateStatus(const QString &); | 51 | void updateStatus(const QString &); |
52 | void mailSent(); | 52 | void mailSent(); |
@@ -54,4 +54,5 @@ signals: | |||
54 | public slots: | 54 | public slots: |
55 | void errorHandling(int); | 55 | void errorHandling(int); |
56 | void errorHandlingWithMsg(int, const QString & LastResponse ); | ||
56 | 57 | ||
57 | protected slots: | 58 | protected slots: |
diff --git a/noncore/net/mailit/viewatt.cpp b/noncore/net/mailit/viewatt.cpp index 21885c2..293e137 100644 --- a/noncore/net/mailit/viewatt.cpp +++ b/noncore/net/mailit/viewatt.cpp | |||
@@ -27,5 +27,5 @@ ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | |||
27 | : QMainWindow(parent, name, f) | 27 | : QMainWindow(parent, name, f) |
28 | { | 28 | { |
29 | setCaption("Exploring attatchments"); | 29 | setCaption(tr("Exploring attatchments")); |
30 | 30 | ||
31 | setToolBarsMovable( FALSE ); | 31 | setToolBarsMovable( FALSE ); |
@@ -36,7 +36,7 @@ ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | |||
36 | 36 | ||
37 | listView = new QListView(this, "AttView"); | 37 | listView = new QListView(this, "AttView"); |
38 | listView->addColumn( "Attatchment" ); | 38 | listView->addColumn( tr("Attatchment") ); |
39 | listView->addColumn( "Type" ); | 39 | listView->addColumn( tr("Type") ); |
40 | listView->addColumn( "Installed" ); | 40 | listView->addColumn( tr("Installed") ); |
41 | setCentralWidget(listView); | 41 | setCentralWidget(listView); |
42 | QWhatsThis::add(listView,QWidget::tr("This is an overview about all attachments in the mail")); | 42 | QWhatsThis::add(listView,QWidget::tr("This is an overview about all attachments in the mail")); |
@@ -62,7 +62,7 @@ void ViewAtt::update(Email *mailIn, bool inbox) | |||
62 | for ( ePtr=mail->files.first(); ePtr != 0; ePtr=mail->files.next() ) { | 62 | for ( ePtr=mail->files.first(); ePtr != 0; ePtr=mail->files.next() ) { |
63 | 63 | ||
64 | QString isInstalled = "No"; | 64 | QString isInstalled = tr("No"); |
65 | if (ePtr->installed) | 65 | if (ePtr->installed) |
66 | isInstalled = "Yes"; | 66 | isInstalled = tr("Yes"); |
67 | item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled); | 67 | item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled); |
68 | 68 | ||
@@ -117,5 +117,5 @@ void ViewAtt::install() | |||
117 | d.writeLink(); | 117 | d.writeLink(); |
118 | selPtr->installed = TRUE; | 118 | selPtr->installed = TRUE; |
119 | item->setText(2, "Yes"); | 119 | item->setText(2, tr("Yes")); |
120 | } | 120 | } |
121 | } | 121 | } |
diff --git a/noncore/net/mailit/writemail.cpp b/noncore/net/mailit/writemail.cpp index 0298cb3..26b9660 100644 --- a/noncore/net/mailit/writemail.cpp +++ b/noncore/net/mailit/writemail.cpp | |||
@@ -119,5 +119,5 @@ void WriteMail::init() | |||
119 | grid->addWidget( addressButton, 0, 2 ); | 119 | grid->addWidget( addressButton, 0, 2 ); |
120 | connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) ); | 120 | connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) ); |
121 | QWhatsThis::add(addressButton,QWidget::tr("This button opens the address selector with all mail adresses from your OPIE addressbook")); | 121 | QWhatsThis::add(addressButton,QWidget::tr("This button opens the address selector with all mail adresses from your Opie addressbook")); |
122 | 122 | ||
123 | emailInput = new QMultiLineEdit( widget, "emailInput" ); | 123 | emailInput = new QMultiLineEdit( widget, "emailInput" ); |
@@ -126,6 +126,6 @@ void WriteMail::init() | |||
126 | 126 | ||
127 | addressView = new QListView( widget, "addressView"); | 127 | addressView = new QListView( widget, "addressView"); |
128 | addressView->addColumn("Name"); | 128 | addressView->addColumn(tr("Name")); |
129 | addressView->addColumn("EMail"); | 129 | addressView->addColumn(tr("EMail") ); |
130 | addressView->setAllColumnsShowFocus(TRUE); | 130 | addressView->setAllColumnsShowFocus(TRUE); |
131 | addressView->setMultiSelection(TRUE); | 131 | addressView->setMultiSelection(TRUE); |
@@ -284,5 +284,5 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
284 | pos = mail.body.find('\n', pos); | 284 | pos = mail.body.find('\n', pos); |
285 | if (pos != -1) | 285 | if (pos != -1) |
286 | mail.body.insert(++pos, ">>"); | 286 | mail.body.insert(++pos, ">"); |
287 | } | 287 | } |
288 | mail.body.insert(0,citation); | 288 | mail.body.insert(0,citation); |
@@ -292,5 +292,5 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
292 | void WriteMail::forward(Email forwMail) | 292 | void WriteMail::forward(Email forwMail) |
293 | { | 293 | { |
294 | int pos=0; | 294 | // int pos=0; |
295 | 295 | ||
296 | QString fwdBody=tr("======forwarded message from "); | 296 | QString fwdBody=tr("======forwarded message from "); |
diff --git a/noncore/unsupported/mailit/addatt.cpp b/noncore/unsupported/mailit/addatt.cpp index daefac6..19ac58f 100644 --- a/noncore/unsupported/mailit/addatt.cpp +++ b/noncore/unsupported/mailit/addatt.cpp | |||
@@ -57,5 +57,5 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f) | |||
57 | : QDialog(parent, name, f) | 57 | : QDialog(parent, name, f) |
58 | { | 58 | { |
59 | setCaption("Adding attachments"); | 59 | setCaption(tr("Adding attachments") ); |
60 | 60 | ||
61 | QGridLayout *top = new QGridLayout(this, 1,1 ); | 61 | QGridLayout *top = new QGridLayout(this, 1,1 ); |
@@ -123,5 +123,5 @@ void AddAtt::clear() | |||
123 | 123 | ||
124 | void AddAtt::addattachment() | 124 | void AddAtt::addattachment() |
125 | { | 125 | {// ### FIXME wrong use -zecke |
126 | OFileDialog ofs("Attachments",this,0,0,"/root/Documents"); | 126 | OFileDialog ofs("Attachments",this,0,0,"/root/Documents"); |
127 | 127 | ||
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 ) | |||
60 | connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); | 60 | connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); |
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 | ||
67 | connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) ); | 67 | connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) ); |
@@ -481,5 +481,5 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
481 | } | 481 | } |
482 | 482 | ||
483 | void EmailClient::allMailArrived(int count) | 483 | void EmailClient::allMailArrived(int /*count*/) |
484 | { | 484 | { |
485 | // not previewing means all mailtransfer has been done | 485 | // not previewing means all mailtransfer has been done |
@@ -519,17 +519,19 @@ void EmailClient::moveMailFront(Email *mailPtr) | |||
519 | } | 519 | } |
520 | 520 | ||
521 | void EmailClient::smtpError(int code) | 521 | void EmailClient::smtpError(int code, const QString & Msg) |
522 | { | 522 | { |
523 | QString temp; | 523 | QString temp; |
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 | ||
535 | if (code != ErrCancel) { | 537 | if (code != ErrCancel) { |
@@ -545,22 +547,25 @@ void EmailClient::smtpError(int code) | |||
545 | } | 547 | } |
546 | 548 | ||
547 | void EmailClient::popError(int code) | 549 | void EmailClient::popError(int code, const QString & Msg) |
548 | { | 550 | { |
549 | QString temp; | 551 | QString temp; |
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) { |
564 | temp = tr("<qt>socket packet error</qt>"); | ||
565 | } | ||
562 | 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 { |
566 | status2Label->setText("Aborted by user"); | 571 | status2Label->setText("Aborted by user"); |
@@ -899,5 +904,5 @@ void EmailClient::setMailSize(int size) | |||
899 | } | 904 | } |
900 | 905 | ||
901 | void EmailClient::setTotalSize(int size) | 906 | void EmailClient::setTotalSize(int /*size*/) |
902 | { | 907 | { |
903 | 908 | ||
@@ -921,5 +926,5 @@ void EmailClient::deleteItem() | |||
921 | 926 | ||
922 | EmailListItem* eli; | 927 | EmailListItem* eli; |
923 | int pos; | 928 | // int pos; |
924 | 929 | ||
925 | inbox ? box=inboxView : box=outboxView; | 930 | inbox ? box=inboxView : box=outboxView; |
@@ -947,5 +952,5 @@ void EmailClient::inboxItemReleased() | |||
947 | /*void EmailClient::timerEvent(QTimerEvent *e) | 952 | /*void EmailClient::timerEvent(QTimerEvent *e) |
948 | { | 953 | { |
949 | /*killTimer(timerID); | 954 | //killTimer(timerID); |
950 | 955 | ||
951 | 956 | ||
@@ -992,9 +997,9 @@ void EmailClient::download(Email* mail) | |||
992 | } | 997 | } |
993 | 998 | ||
994 | void EmailClient::receive(const QCString& msg, const QByteArray& data) | 999 | void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/) |
995 | { | 1000 | { |
996 | /*if (msg=="getMail()") | 1001 | /*if (msg=="getMail()") |
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 ); |
1000 | 1005 | ||
diff --git a/noncore/unsupported/mailit/emailclient.h b/noncore/unsupported/mailit/emailclient.h index c98cfce..80c6d31 100644 --- a/noncore/unsupported/mailit/emailclient.h +++ b/noncore/unsupported/mailit/emailclient.h | |||
@@ -99,6 +99,6 @@ public slots: | |||
99 | void getNewMail(); | 99 | void getNewMail(); |
100 | void getAllNewMail(); | 100 | void getAllNewMail(); |
101 | void smtpError(int code); | 101 | void smtpError(int code, const QString & Msg ); |
102 | void popError(int code); | 102 | void popError(int code, const QString & Msg); |
103 | void inboxItemSelected(); | 103 | void inboxItemSelected(); |
104 | void outboxItemSelected(); | 104 | void outboxItemSelected(); |
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp index 39f693d..5b8bda1 100644 --- a/noncore/unsupported/mailit/emailhandler.cpp +++ b/noncore/unsupported/mailit/emailhandler.cpp | |||
@@ -45,12 +45,12 @@ EmailHandler::EmailHandler() | |||
45 | popClient = new PopClient(); | 45 | popClient = new PopClient(); |
46 | 46 | ||
47 | connect(smtpClient, SIGNAL(errorOccurred(int)), this, | 47 | connect(smtpClient, SIGNAL(errorOccurred(int, const QString &)), this, |
48 | SIGNAL(smtpError(int)) ); | 48 | SIGNAL(smtpError(int, const QString &)) ); |
49 | connect(smtpClient, SIGNAL(mailSent()), this, SIGNAL(mailSent()) ); | 49 | connect(smtpClient, SIGNAL(mailSent()), this, SIGNAL(mailSent()) ); |
50 | connect(smtpClient, SIGNAL(updateStatus(const QString &)), this, | 50 | connect(smtpClient, SIGNAL(updateStatus(const QString &)), this, |
51 | SIGNAL(updateSmtpStatus(const QString &)) ); | 51 | SIGNAL(updateSmtpStatus(const QString &)) ); |
52 | 52 | ||
53 | connect(popClient, SIGNAL(errorOccurred(int)), this, | 53 | connect(popClient, SIGNAL(errorOccurred(int, const QString &)), this, |
54 | SIGNAL(popError(int)) ); | 54 | SIGNAL(popError(int, const QString &)) ); |
55 | connect(popClient, SIGNAL(newMessage(const QString &, int, uint, bool)), | 55 | connect(popClient, SIGNAL(newMessage(const QString &, int, uint, bool)), |
56 | this, SLOT(messageArrived(const QString &, int, uint, bool)) ); | 56 | this, SLOT(messageArrived(const QString &, int, uint, bool)) ); |
diff --git a/noncore/unsupported/mailit/emailhandler.h b/noncore/unsupported/mailit/emailhandler.h index e4e7f46..74a8e4c 100644 --- a/noncore/unsupported/mailit/emailhandler.h +++ b/noncore/unsupported/mailit/emailhandler.h | |||
@@ -128,6 +128,6 @@ public: | |||
128 | signals: | 128 | signals: |
129 | void mailSent(); | 129 | void mailSent(); |
130 | void smtpError(int); | 130 | void smtpError(int, const QString & Msg ); |
131 | void popError(int); | 131 | void popError(int, const QString & Msg ); |
132 | void mailArrived(const Email &, bool); | 132 | void mailArrived(const Email &, bool); |
133 | void updatePopStatus(const QString &); | 133 | void updatePopStatus(const QString &); |
diff --git a/noncore/unsupported/mailit/mailit.pro b/noncore/unsupported/mailit/mailit.pro index cfbda36..5e9a83a 100644 --- a/noncore/unsupported/mailit/mailit.pro +++ b/noncore/unsupported/mailit/mailit.pro | |||
@@ -1,3 +1,4 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | TARGET = mailit | ||
2 | CONFIG = qt warn_on release | 3 | CONFIG = qt warn_on release |
3 | HEADERS = emailclient.h \ | 4 | HEADERS = emailclient.h \ |
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp index f945a0f..6e298c7 100644 --- a/noncore/unsupported/mailit/mailitwindow.cpp +++ b/noncore/unsupported/mailit/mailitwindow.cpp | |||
@@ -22,8 +22,8 @@ | |||
22 | #include "mailitwindow.h" | 22 | #include "mailitwindow.h" |
23 | 23 | ||
24 | MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl) | 24 | MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags /*fl*/) |
25 | : QMainWindow(parent, name, WStyle_ContextHelp) | 25 | : QMainWindow(parent, name, WStyle_ContextHelp) |
26 | { | 26 | { |
27 | currentCaption = "Mailit"; | 27 | currentCaption = tr("Mailit"); |
28 | setCaption(tr(currentCaption)); | 28 | setCaption(tr(currentCaption)); |
29 | views = new QWidgetStack(this); | 29 | views = new QWidgetStack(this); |
diff --git a/noncore/unsupported/mailit/maillist.cpp b/noncore/unsupported/mailit/maillist.cpp index b5325a9..8c34295 100644 --- a/noncore/unsupported/mailit/maillist.cpp +++ b/noncore/unsupported/mailit/maillist.cpp | |||
@@ -75,5 +75,5 @@ void MailList::sizeInsert(int serverId, uint size) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | void MailList::moveFront(int serverId, uint size) | 77 | void MailList::moveFront(int serverId, uint/* size*/) |
78 | { | 78 | { |
79 | dList *currentPtr; | 79 | dList *currentPtr; |
@@ -101,5 +101,5 @@ void MailList::moveFront(int serverId, uint size) | |||
101 | 101 | ||
102 | //only works if mail is not already in download | 102 | //only works if mail is not already in download |
103 | bool MailList::remove(int serverId, uint size) | 103 | bool MailList::remove(int serverId, uint /*size*/) |
104 | { | 104 | { |
105 | dList *currentPtr; | 105 | dList *currentPtr; |
@@ -126,5 +126,5 @@ bool MailList::remove(int serverId, uint size) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | void MailList::insert(int pos, int serverId, uint size) | 128 | void MailList::insert(int /*pos*/, int /*serverId*/, uint/* size*/) |
129 | { | 129 | { |
130 | //sortedList.insert(pos, mPtr); | 130 | //sortedList.insert(pos, mPtr); |
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp index dc0116d..5da3bcb 100644 --- a/noncore/unsupported/mailit/popclient.cpp +++ b/noncore/unsupported/mailit/popclient.cpp | |||
@@ -64,5 +64,5 @@ void PopClient::newConnection(const QString &target, int port) | |||
64 | //selected = FALSE; | 64 | //selected = FALSE; |
65 | 65 | ||
66 | emit updateStatus("DNS lookup"); | 66 | emit updateStatus(tr("DNS lookup")); |
67 | } | 67 | } |
68 | 68 | ||
@@ -104,6 +104,10 @@ void PopClient::connectionEstablished() | |||
104 | void PopClient::errorHandling(int status) | 104 | void PopClient::errorHandling(int status) |
105 | { | 105 | { |
106 | errorHandlingWithMsg( status, QString::null ); | ||
107 | } | ||
108 | void PopClient::errorHandlingWithMsg(int status, const QString & Msg ) | ||
109 | { | ||
106 | emit updateStatus(tr("Error Occured")); | 110 | emit updateStatus(tr("Error Occured")); |
107 | emit errorOccurred(status); | 111 | emit errorOccurred(status, Msg); |
108 | socket->close(); | 112 | socket->close(); |
109 | receiving = FALSE; | 113 | receiving = FALSE; |
@@ -168,5 +172,5 @@ void PopClient::incomingData() | |||
168 | *stream << "STAT" << "\r\n"; | 172 | *stream << "STAT" << "\r\n"; |
169 | status = Mcnt; | 173 | status = Mcnt; |
170 | } else errorHandling(ErrLoginFailed); | 174 | } else errorHandlingWithMsg(ErrLoginFailed, response); |
171 | break; | 175 | break; |
172 | } | 176 | } |
@@ -196,5 +200,5 @@ void PopClient::incomingData() | |||
196 | } | 200 | } |
197 | 201 | ||
198 | } else errorHandling(ErrUnknownResponse); | 202 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
199 | } | 203 | } |
200 | //Read message number x, count upwards to messageCount | 204 | //Read message number x, count upwards to messageCount |
@@ -235,5 +239,5 @@ void PopClient::incomingData() | |||
235 | } else { | 239 | } else { |
236 | //qWarning(response); | 240 | //qWarning(response); |
237 | errorHandling(ErrUnknownResponse); | 241 | errorHandlingWithMsg(ErrUnknownResponse, response); |
238 | } | 242 | } |
239 | } | 243 | } |
@@ -260,5 +264,5 @@ void PopClient::incomingData() | |||
260 | break; | 264 | break; |
261 | response = socket->readLine(); | 265 | response = socket->readLine(); |
262 | } else errorHandling(ErrUnknownResponse); | 266 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
263 | } | 267 | } |
264 | } | 268 | } |
diff --git a/noncore/unsupported/mailit/popclient.h b/noncore/unsupported/mailit/popclient.h index c58bc48..6774ceb 100644 --- a/noncore/unsupported/mailit/popclient.h +++ b/noncore/unsupported/mailit/popclient.h | |||
@@ -45,5 +45,5 @@ public: | |||
45 | signals: | 45 | signals: |
46 | void newMessage(const QString &, int, uint, bool); | 46 | void newMessage(const QString &, int, uint, bool); |
47 | void errorOccurred(int status); | 47 | void errorOccurred(int status, const QString & Msg ); |
48 | void updateStatus(const QString &); | 48 | void updateStatus(const QString &); |
49 | void mailTransfered(int); | 49 | void mailTransfered(int); |
@@ -54,4 +54,5 @@ signals: | |||
54 | public slots: | 54 | public slots: |
55 | void errorHandling(int); | 55 | void errorHandling(int); |
56 | void errorHandlingWithMsg(int, const QString & ); | ||
56 | 57 | ||
57 | protected slots: | 58 | protected slots: |
diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp index 2916f45..5b5ef52 100644 --- a/noncore/unsupported/mailit/smtpclient.cpp +++ b/noncore/unsupported/mailit/smtpclient.cpp | |||
@@ -74,5 +74,10 @@ void SmtpClient::connectionEstablished() | |||
74 | void SmtpClient::errorHandling(int status) | 74 | void SmtpClient::errorHandling(int status) |
75 | { | 75 | { |
76 | emit errorOccurred(status); | 76 | errorHandlingWithMsg( status, QString::null ); |
77 | } | ||
78 | |||
79 | void SmtpClient::errorHandlingWithMsg(int status, const QString & EMsg ) | ||
80 | { | ||
81 | emit errorOccurred(status, EMsg ); | ||
77 | socket->close(); | 82 | socket->close(); |
78 | mailList.clear(); | 83 | mailList.clear(); |
@@ -88,5 +93,4 @@ void SmtpClient::incomingData() | |||
88 | 93 | ||
89 | response = socket->readLine(); | 94 | response = socket->readLine(); |
90 | |||
91 | switch(status) { | 95 | switch(status) { |
92 | case Init: { | 96 | case Init: { |
@@ -95,12 +99,13 @@ void SmtpClient::incomingData() | |||
95 | mailPtr = mailList.first(); | 99 | mailPtr = mailList.first(); |
96 | *stream << "HELO there\r\n"; | 100 | *stream << "HELO there\r\n"; |
97 | } else errorHandling(ErrUnknownResponse); | 101 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
98 | break; | 102 | break; |
99 | } | 103 | } |
100 | case From: { | 104 | case From: { |
101 | if (response[0] == '2') { | 105 | if (response[0] == '2') { |
102 | *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; | 106 | qDebug(mailPtr->from); |
107 | *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; | ||
103 | status = Recv; | 108 | status = Recv; |
104 | } else errorHandling(ErrUnknownResponse); | 109 | } else errorHandlingWithMsg(ErrUnknownResponse, response ); |
105 | break; | 110 | break; |
106 | } | 111 | } |
@@ -108,9 +113,10 @@ void SmtpClient::incomingData() | |||
108 | if (response[0] == '2') { | 113 | if (response[0] == '2') { |
109 | it = mailPtr->to.begin(); | 114 | it = mailPtr->to.begin(); |
110 | if (it == NULL) | 115 | if (it == NULL) { |
111 | errorHandling(ErrUnknownResponse); | 116 | errorHandlingWithMsg(ErrUnknownResponse,response); |
112 | *stream << "RCPT TO: " << *it << ">\r\n"; | 117 | } |
118 | *stream << "RCPT TO: <" << *it << ">\r\n"; | ||
113 | status = MRcv; | 119 | status = MRcv; |
114 | } else errorHandling(ErrUnknownResponse); | 120 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
115 | break; | 121 | break; |
116 | } | 122 | } |
@@ -124,5 +130,5 @@ void SmtpClient::incomingData() | |||
124 | status = Data; | 130 | status = Data; |
125 | } | 131 | } |
126 | } else errorHandling(ErrUnknownResponse); | 132 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
127 | } | 133 | } |
128 | case Data: { | 134 | case Data: { |
@@ -131,5 +137,6 @@ void SmtpClient::incomingData() | |||
131 | status = Body; | 137 | status = Body; |
132 | emit updateStatus(tr("Sending: ") + mailPtr->subject); | 138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); |
133 | } else errorHandling(ErrUnknownResponse); | 139 | |
140 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | ||
134 | break; | 141 | break; |
135 | } | 142 | } |
@@ -143,5 +150,5 @@ void SmtpClient::incomingData() | |||
143 | status = Quit; | 150 | status = Quit; |
144 | } | 151 | } |
145 | } else errorHandling(ErrUnknownResponse); | 152 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
146 | break; | 153 | break; |
147 | } | 154 | } |
@@ -157,5 +164,5 @@ void SmtpClient::incomingData() | |||
157 | sending = FALSE; | 164 | sending = FALSE; |
158 | socket->close(); | 165 | socket->close(); |
159 | } else errorHandling(ErrUnknownResponse); | 166 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
160 | break; | 167 | break; |
161 | } | 168 | } |
diff --git a/noncore/unsupported/mailit/smtpclient.h b/noncore/unsupported/mailit/smtpclient.h index 45c0703..554ba3f 100644 --- a/noncore/unsupported/mailit/smtpclient.h +++ b/noncore/unsupported/mailit/smtpclient.h | |||
@@ -48,5 +48,5 @@ public: | |||
48 | 48 | ||
49 | signals: | 49 | signals: |
50 | void errorOccurred(int); | 50 | void errorOccurred(int, const QString & LR ); |
51 | void updateStatus(const QString &); | 51 | void updateStatus(const QString &); |
52 | void mailSent(); | 52 | void mailSent(); |
@@ -54,4 +54,5 @@ signals: | |||
54 | public slots: | 54 | public slots: |
55 | void errorHandling(int); | 55 | void errorHandling(int); |
56 | void errorHandlingWithMsg(int, const QString & LastResponse ); | ||
56 | 57 | ||
57 | protected slots: | 58 | protected slots: |
diff --git a/noncore/unsupported/mailit/viewatt.cpp b/noncore/unsupported/mailit/viewatt.cpp index 21885c2..293e137 100644 --- a/noncore/unsupported/mailit/viewatt.cpp +++ b/noncore/unsupported/mailit/viewatt.cpp | |||
@@ -27,5 +27,5 @@ ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | |||
27 | : QMainWindow(parent, name, f) | 27 | : QMainWindow(parent, name, f) |
28 | { | 28 | { |
29 | setCaption("Exploring attatchments"); | 29 | setCaption(tr("Exploring attatchments")); |
30 | 30 | ||
31 | setToolBarsMovable( FALSE ); | 31 | setToolBarsMovable( FALSE ); |
@@ -36,7 +36,7 @@ ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | |||
36 | 36 | ||
37 | listView = new QListView(this, "AttView"); | 37 | listView = new QListView(this, "AttView"); |
38 | listView->addColumn( "Attatchment" ); | 38 | listView->addColumn( tr("Attatchment") ); |
39 | listView->addColumn( "Type" ); | 39 | listView->addColumn( tr("Type") ); |
40 | listView->addColumn( "Installed" ); | 40 | listView->addColumn( tr("Installed") ); |
41 | setCentralWidget(listView); | 41 | setCentralWidget(listView); |
42 | QWhatsThis::add(listView,QWidget::tr("This is an overview about all attachments in the mail")); | 42 | QWhatsThis::add(listView,QWidget::tr("This is an overview about all attachments in the mail")); |
@@ -62,7 +62,7 @@ void ViewAtt::update(Email *mailIn, bool inbox) | |||
62 | for ( ePtr=mail->files.first(); ePtr != 0; ePtr=mail->files.next() ) { | 62 | for ( ePtr=mail->files.first(); ePtr != 0; ePtr=mail->files.next() ) { |
63 | 63 | ||
64 | QString isInstalled = "No"; | 64 | QString isInstalled = tr("No"); |
65 | if (ePtr->installed) | 65 | if (ePtr->installed) |
66 | isInstalled = "Yes"; | 66 | isInstalled = tr("Yes"); |
67 | item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled); | 67 | item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled); |
68 | 68 | ||
@@ -117,5 +117,5 @@ void ViewAtt::install() | |||
117 | d.writeLink(); | 117 | d.writeLink(); |
118 | selPtr->installed = TRUE; | 118 | selPtr->installed = TRUE; |
119 | item->setText(2, "Yes"); | 119 | item->setText(2, tr("Yes")); |
120 | } | 120 | } |
121 | } | 121 | } |
diff --git a/noncore/unsupported/mailit/writemail.cpp b/noncore/unsupported/mailit/writemail.cpp index 0298cb3..26b9660 100644 --- a/noncore/unsupported/mailit/writemail.cpp +++ b/noncore/unsupported/mailit/writemail.cpp | |||
@@ -119,5 +119,5 @@ void WriteMail::init() | |||
119 | grid->addWidget( addressButton, 0, 2 ); | 119 | grid->addWidget( addressButton, 0, 2 ); |
120 | connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) ); | 120 | connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) ); |
121 | QWhatsThis::add(addressButton,QWidget::tr("This button opens the address selector with all mail adresses from your OPIE addressbook")); | 121 | QWhatsThis::add(addressButton,QWidget::tr("This button opens the address selector with all mail adresses from your Opie addressbook")); |
122 | 122 | ||
123 | emailInput = new QMultiLineEdit( widget, "emailInput" ); | 123 | emailInput = new QMultiLineEdit( widget, "emailInput" ); |
@@ -126,6 +126,6 @@ void WriteMail::init() | |||
126 | 126 | ||
127 | addressView = new QListView( widget, "addressView"); | 127 | addressView = new QListView( widget, "addressView"); |
128 | addressView->addColumn("Name"); | 128 | addressView->addColumn(tr("Name")); |
129 | addressView->addColumn("EMail"); | 129 | addressView->addColumn(tr("EMail") ); |
130 | addressView->setAllColumnsShowFocus(TRUE); | 130 | addressView->setAllColumnsShowFocus(TRUE); |
131 | addressView->setMultiSelection(TRUE); | 131 | addressView->setMultiSelection(TRUE); |
@@ -284,5 +284,5 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
284 | pos = mail.body.find('\n', pos); | 284 | pos = mail.body.find('\n', pos); |
285 | if (pos != -1) | 285 | if (pos != -1) |
286 | mail.body.insert(++pos, ">>"); | 286 | mail.body.insert(++pos, ">"); |
287 | } | 287 | } |
288 | mail.body.insert(0,citation); | 288 | mail.body.insert(0,citation); |
@@ -292,5 +292,5 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
292 | void WriteMail::forward(Email forwMail) | 292 | void WriteMail::forward(Email forwMail) |
293 | { | 293 | { |
294 | int pos=0; | 294 | // int pos=0; |
295 | 295 | ||
296 | QString fwdBody=tr("======forwarded message from "); | 296 | QString fwdBody=tr("======forwarded message from "); |