summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ustring.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/ustring.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ustring.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/ustring.h b/noncore/apps/opie-reader/ustring.h
index a3ef8df..95da26b 100644
--- a/noncore/apps/opie-reader/ustring.h
+++ b/noncore/apps/opie-reader/ustring.h
@@ -62,3 +62,13 @@ inline QString toQString(tchar *_p, unsigned int len)
QString ret;
+#ifdef _WINDOWS
+// ret.fill(' ', len);
+ for (i = 0; i < len; i++)
+ {
+ if (p[i] == 0) break;
+ ret.at((uint)i) = p[i];
+ }
+// while (*p != 0 && i < len) ret.at((uint)i++) = (tchar)(*(p++));
+#else
while (*p != 0 && i < len) ret[i++] = *(p++);
+#endif
return ret;