From 6e4ea62b0a54d7f752edc2530b15461114eceef6 Mon Sep 17 00:00:00 2001 From: Matt Hoosier Date: Tue, 15 Oct 2013 08:30:16 -0500 Subject: 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 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 --- src/corelib/tools/qcollator_posix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib') 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 +#include 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()); } -- cgit v1.2.3