diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-04-12 12:48:13 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-04-12 13:39:00 (GMT) |
commit | 46163663e956b988719563eae18773a2dedd424e (patch) | |
tree | 1064cae633e56f66f7a1cc49de4720f3807284e0 /config.tests/unix/icu | |
parent | 04d1cbce75e77392077ce4ae014fe8774c32a8fc (diff) | |
download | Qt-46163663e956b988719563eae18773a2dedd424e.zip Qt-46163663e956b988719563eae18773a2dedd424e.tar.gz Qt-46163663e956b988719563eae18773a2dedd424e.tar.bz2 |
Added support for libICU for collation and toLower/toUpper.
This patch uses icu to do string collation via QString::localeAwareCompare
function and for QString::toLower/toUpper - which is important e.g. for turkish
locales where uppercased 'i' is not a latin 'I'.
Based on the patch by Harald Fernengel
Reviewed-by: Harald Fernengel
Reviewed-by: Zeno Albisser
Diffstat (limited to 'config.tests/unix/icu')
-rw-r--r-- | config.tests/unix/icu/icu.cpp | 54 | ||||
-rw-r--r-- | config.tests/unix/icu/icu.pro | 4 |
2 files changed, 58 insertions, 0 deletions
diff --git a/config.tests/unix/icu/icu.cpp b/config.tests/unix/icu/icu.cpp new file mode 100644 index 0000000..f03b160 --- /dev/null +++ b/config.tests/unix/icu/icu.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <unicode/utypes.h> +#include <unicode/ucol.h> +#include <unicode/ustring.h> + +int main(int, char **) +{ + UErrorCode status = U_ZERO_ERROR; + UCollator *collator = ucol_open("ru_RU", &status); + if (U_FAILURE(status)) + return 0; + ucol_close(collator); + return 0; +} diff --git a/config.tests/unix/icu/icu.pro b/config.tests/unix/icu/icu.pro new file mode 100644 index 0000000..8e58334 --- /dev/null +++ b/config.tests/unix/icu/icu.pro @@ -0,0 +1,4 @@ +SOURCES = icu.cpp +CONFIG -= qt dylib app_bundle +unix:LIBS += -licuuc -licui18n +win32:LIBS += -licuin |