Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 673f288..2d7533c 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp | |||
@@ -81,38 +81,36 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin | |||
81 | &result_text,&target_length); | 81 | &result_text,&target_length); |
82 | 82 | ||
83 | encodedString* result = new encodedString(); | 83 | encodedString* result = new encodedString(); |
84 | if (err == MAILIMF_NO_ERROR) { | 84 | if (err == MAILIMF_NO_ERROR) { |
85 | result->setContent(result_text,target_length); | 85 | result->setContent(result_text,target_length); |
86 | } | 86 | } |
87 | //odebug << "Decode string finished" << oendl; | 87 | //odebug << "Decode string finished" << oendl; |
88 | return result; | 88 | return result; |
89 | } | 89 | } |
90 | 90 | ||
91 | QString AbstractMail::convert_String(const char*text) | 91 | QString AbstractMail::convert_String(const char*text) |
92 | { | 92 | { |
93 | //size_t index = 0; | 93 | size_t index = 0; |
94 | char*res = 0; | 94 | char*res = 0; |
95 | int err = MAILIMF_NO_ERROR; | 95 | int err = MAILIMF_NO_ERROR; |
96 | 96 | ||
97 | QString result(text); | 97 | QString result(text); |
98 | 98 | ||
99 | /* due a bug in libetpan it isn't usable this moment */ | 99 | err = mailmime_encoded_phrase_parse("iso-8859-1", |
100 | /* int err = mailmime_encoded_phrase_parse("iso-8859-1", | 100 | text, strlen(text),&index, "iso-8859-1",&res); |
101 | text, strlen(text),&index, "iso-8859-1",&res);*/ | ||
102 | //odebug << "Input: " << text << "" << oendl; | ||
103 | if (err == MAILIMF_NO_ERROR && res && strlen(res)) { | 101 | if (err == MAILIMF_NO_ERROR && res && strlen(res)) { |
104 | // result = QString(res); | 102 | result = QString(res); |
105 | // odebug << "Res: " << res << ", length: " << strlen(res) << "" << oendl; | ||
106 | } | 103 | } |
104 | //qDebug("convert_String:%s ",result.latin1() ); | ||
107 | if (res) free(res); | 105 | if (res) free(res); |
108 | return result; | 106 | return result; |
109 | } | 107 | } |
110 | 108 | ||
111 | /* cp & paste from launcher */ | 109 | /* cp & paste from launcher */ |
112 | QString AbstractMail::gen_attachment_id() | 110 | QString AbstractMail::gen_attachment_id() |
113 | { | 111 | { |
114 | QFile file( "/proc/sys/kernel/random/uuid" ); | 112 | QFile file( "/proc/sys/kernel/random/uuid" ); |
115 | if (!file.open(IO_ReadOnly ) ) | 113 | if (!file.open(IO_ReadOnly ) ) |
116 | return QString::null; | 114 | return QString::null; |
117 | 115 | ||
118 | QTextStream stream(&file); | 116 | QTextStream stream(&file); |