Diffstat (limited to 'noncore/apps/opie-reader/ustring.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ustring.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/ustring.h b/noncore/apps/opie-reader/ustring.h index a4dc048..a3ef8df 100644 --- a/noncore/apps/opie-reader/ustring.h +++ b/noncore/apps/opie-reader/ustring.h | |||
@@ -64,4 +64,16 @@ inline QString toQString(tchar *_p, unsigned int len) | |||
64 | return ret; | 64 | return ret; |
65 | } | 65 | } |
66 | |||
67 | inline tchar* fromQString(const QString& qs) | ||
68 | { | ||
69 | int len = qs.length(); | ||
70 | tchar* ret = new tchar[len+1]; | ||
71 | for (int i = 0; i < len; i++) | ||
72 | { | ||
73 | ret[i] = qs[i].unicode(); | ||
74 | } | ||
75 | ret[len] = 0; | ||
76 | return ret; | ||
77 | } | ||
66 | #else | 78 | #else |
67 | 79 | ||