author | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
commit | 118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (side-by-side diff) | |
tree | 356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/ustring.h | |
parent | 00894537decf01c5a5cdc565b2740b5e67a2e90f (diff) | |
download | opie-118d03d815a7615b9c53363218a7ac45b3f4c514.zip opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.gz opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.bz2 |
Incorporated TimWs current source tree and make it compile
Diffstat (limited to 'noncore/apps/opie-reader/ustring.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ustring.h | 10 |
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 @@ -59,9 +59,19 @@ inline QString toQString(tchar *_p, unsigned int len) if (_p == NULL) return 0; unsigned int i = 0; tchar *p = _p; 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; } inline tchar* fromQString(const QString& qs) |