diff options
author | Robin Burchell <robin.burchell@collabora.co.uk> | 2012-05-01 20:35:31 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-03 16:11:58 +0200 |
commit | f02acb8bfc3a4b242b9cc494050f2a93eb802b80 (patch) | |
tree | 7bbcf08ed881b74145c584df1aaa418bd2b379af /src/corelib | |
parent | eb9474d045e5acc23ed125a835e7bc5d66395d69 (diff) |
Work around std::wstring not being defined on Android.
libstdc++ requires wchar.h (which bionic provides), but it also requires
additional functionality which bionic does not provide, thus, std::wstring
proper basically doesn't exist.
Provide a compatibility shim so we can keep API intact. This feature existed in
a similar guise in the past, but was removed in
d868c9945a188d6ad22e0b7d6d24ac7fca00ab4e.
Change-Id: I6cab6f41d04ad9dde97e3ce73506f9d8a42043fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qstring.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 5b6869d111..3d0de55ed7 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -49,6 +49,15 @@ #include <string> +#if defined(Q_OS_LINUX_ANDROID) +// std::wstring is disabled on android's glibc, as bionic lacks certain features +// that libstdc++ checks for (like mbcslen). +namespace std +{ + typedef basic_string<wchar_t> wstring; +} +#endif + #include <stdarg.h> #ifdef truncate |