Diffstat (limited to 'noncore/unsupported/mail2/libmail') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/libmail/mailfactory.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/mail2/libmail/mailfactory.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/unsupported/mail2/libmail/mailfactory.cpp b/noncore/unsupported/mail2/libmail/mailfactory.cpp index 6602919..e02f80f 100644 --- a/noncore/unsupported/mail2/libmail/mailfactory.cpp +++ b/noncore/unsupported/mail2/libmail/mailfactory.cpp | |||
@@ -83,13 +83,13 @@ MailFactory::MailFactory(SendMail &smail, QWidget *parent) | |||
83 | QFile f((*it).fileName()); | 83 | QFile f((*it).fileName()); |
84 | if (f.open(IO_ReadOnly)) { | 84 | if (f.open(IO_ReadOnly)) { |
85 | QTextStream t(&f); | 85 | QTextStream t(&f); |
86 | QString file; | 86 | QString file; |
87 | while (!t.atEnd()) file += t.readLine() + "\n"; | 87 | while (!t.atEnd()) file += t.readLine() + "\n"; |
88 | f.close(); | 88 | f.close(); |
89 | QString mimetype = (new MimeType(*(*it).docLnk()))->id(); | 89 | QString mimetype = (new MimeType((*it).docLnk()))->id(); |
90 | 90 | ||
91 | _body += "\n--" + boundary + "\n"; | 91 | _body += "\n--" + boundary + "\n"; |
92 | _body += "Content-Type: " + mimetype + "; name=\"" + (*it).newName() + "\"\n"; | 92 | _body += "Content-Type: " + mimetype + "; name=\"" + (*it).newName() + "\"\n"; |
93 | 93 | ||
94 | // TODO: Decide which content transfer encoding is best. B64 for binary, QP for text. | 94 | // TODO: Decide which content transfer encoding is best. B64 for binary, QP for text. |
95 | _body += "Content-Transfer-Encoding: base64\n"; | 95 | _body += "Content-Transfer-Encoding: base64\n"; |
diff --git a/noncore/unsupported/mail2/libmail/mailfactory.h b/noncore/unsupported/mail2/libmail/mailfactory.h index 8f67447..c938c27 100644 --- a/noncore/unsupported/mail2/libmail/mailfactory.h +++ b/noncore/unsupported/mail2/libmail/mailfactory.h | |||
@@ -10,22 +10,22 @@ | |||
10 | class Attachment | 10 | class Attachment |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | void setFileName(QString fileName) { _fileName = fileName; } | 13 | void setFileName(QString fileName) { _fileName = fileName; } |
14 | void setNewName(QString newName) { _newName = newName; } | 14 | void setNewName(QString newName) { _newName = newName; } |
15 | void setDescription(QString description) { _description = description; } | 15 | void setDescription(QString description) { _description = description; } |
16 | void setDocLnk(DocLnk *docLnk) { _docLnk = docLnk; } | 16 | void setDocLnk(DocLnk docLnk) { _docLnk = docLnk; } |
17 | 17 | ||
18 | QString fileName() { return _fileName; } | 18 | QString fileName() { return _fileName; } |
19 | QString newName() { return _newName; } | 19 | QString newName() { return _newName; } |
20 | QString description() { return _description; } | 20 | QString description() { return _description; } |
21 | DocLnk *docLnk() { return _docLnk; } | 21 | DocLnk docLnk() { return _docLnk; } |
22 | 22 | ||
23 | protected: | 23 | protected: |
24 | QString _fileName, _newName, _description; | 24 | QString _fileName, _newName, _description; |
25 | DocLnk *_docLnk; | 25 | DocLnk _docLnk; |
26 | 26 | ||
27 | }; | 27 | }; |
28 | 28 | ||
29 | class SendMail | 29 | class SendMail |
30 | { | 30 | { |
31 | public: | 31 | public: |