summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_icu.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-06-02 00:38:48 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-10 19:09:04 +0200
commitb2c1550564b6cdf2b1cce262355c6b7f8b9b425a (patch)
treefbbe5468ff5d698e5d6858ec10992305074bdbbb /src/corelib/tools/qlocale_icu.cpp
parent1e9be1327bed93542816abb1aef6bcee25216ce0 (diff)
Use QCollator in QString and remove it from qlocale_icu
Change-Id: Ic94439943999382f8050668edfb67d3b75ac1df4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qlocale_icu.cpp')
-rw-r--r--src/corelib/tools/qlocale_icu.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/corelib/tools/qlocale_icu.cpp b/src/corelib/tools/qlocale_icu.cpp
index 97ce82108b..af6b6e2dfa 100644
--- a/src/corelib/tools/qlocale_icu.cpp
+++ b/src/corelib/tools/qlocale_icu.cpp
@@ -45,8 +45,6 @@
#include "qlocale_p.h"
#include "qmutex.h"
-#include "unicode/uversion.h"
-#include "unicode/ucol.h"
#include "unicode/uloc.h"
#include "unicode/ustring.h"
@@ -54,28 +52,6 @@ QT_BEGIN_NAMESPACE
typedef int32_t (*Ptr_u_strToCase)(UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, const char *locale, UErrorCode *pErrorCode);
-bool QIcu::strcoll(const QByteArray &localeID,
- const QChar *source, int sourceLength, const QChar *target, int targetLength, int *result)
-{
- Q_ASSERT(result);
- Q_ASSERT(source);
- Q_ASSERT(target);
-
- UErrorCode icuStatus = U_ZERO_ERROR;
- UCollator *collator = ucol_open(localeID, &icuStatus);
-
- if (U_FAILURE((icuStatus)))
- return false;
-
- *result = ucol_strcoll(collator,
- reinterpret_cast<const UChar *>(source), int32_t(sourceLength),
- reinterpret_cast<const UChar *>(target), int32_t(targetLength));
-
- ucol_close(collator);
-
- return true;
-}
-
// caseFunc can either be u_strToUpper or u_strToLower
static bool qt_u_strToCase(const QString &str, QString *out, const char *localeID, Ptr_u_strToCase caseFunc)
{