Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 3d76c96..626b9aa 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -4,6 +4,8 @@ | |||
4 | #include "mailtypes.h" | 4 | #include "mailtypes.h" |
5 | 5 | ||
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | #include <qfile.h> | ||
8 | #include <qtextstream.h> | ||
7 | #include <stdlib.h> | 9 | #include <stdlib.h> |
8 | #include <libetpan/mailmime_content.h> | 10 | #include <libetpan/mailmime_content.h> |
9 | 11 | ||
@@ -66,3 +68,16 @@ QString AbstractMail::convert_String(const char*text) | |||
66 | } | 68 | } |
67 | return QString(text); | 69 | return QString(text); |
68 | } | 70 | } |
71 | |||
72 | /* cp & paste from launcher */ | ||
73 | QString AbstractMail::gen_attachment_id() | ||
74 | { | ||
75 | QFile file( "/proc/sys/kernel/random/uuid" ); | ||
76 | if (!file.open(IO_ReadOnly ) ) | ||
77 | return QString::null; | ||
78 | |||
79 | QTextStream stream(&file); | ||
80 | |||
81 | return "{" + stream.read().stripWhiteSpace() + "}"; | ||
82 | } | ||
83 | |||