diff options
author | Matt Hoosier <matt.hoosier@garmin.com> | 2013-10-15 08:30:16 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-16 02:21:23 +0200 |
commit | 6e4ea62b0a54d7f752edc2530b15461114eceef6 (patch) | |
tree | e4db0afc60b563ecb95098e6db48bbcd2a5d6952 /src/corelib/tools/qcollator_posix.cpp | |
parent | 6c5e6a030dc49f36a5d4f2846fe78daf3d02a03d (diff) |
Fix wide-char use in Posix collator
Although the C++ language builds in the 'wchar_t' datatype, the
library functions such as wcscmp() which manipulate them are not
automatically available. For these, inclusion of the <cwhar> header
is still required.
This changeset fixes build breakage observed from failure to include
the requisite system header for accessing wcscmp() and other related
functions on non-GNU standard C++ library implementations.
Change-Id: I5b2f9148ea011004e5dd00cf41698339db172de8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qcollator_posix.cpp')
-rw-r--r-- | src/corelib/tools/qcollator_posix.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qcollator_posix.cpp b/src/corelib/tools/qcollator_posix.cpp index c6e589c174..a43618dcf1 100644 --- a/src/corelib/tools/qcollator_posix.cpp +++ b/src/corelib/tools/qcollator_posix.cpp @@ -44,6 +44,7 @@ #include "qstring.h" #include <cstring> +#include <cwchar> QT_BEGIN_NAMESPACE @@ -141,7 +142,7 @@ bool QCollatorSortKey::operator<(const QCollatorSortKey &otherKey) const int QCollatorSortKey::compare(const QCollatorSortKey &otherKey) const { - return wcscmp(d->m_key.constData(), + return std::wcscmp(d->m_key.constData(), otherKey.d->m_key.constData()); } |