Use the QT_STRINGIFY macro

This macro is now left defined from qglobal.h, so we don't need to
redefine it everywhere (and risk getting it wrong).

Change-Id: I2a11d10fe0434b85e79d0dda5f11fa90e2edc431
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
bb10
Thiago Macieira 2012-05-23 15:57:06 +02:00 committed by Qt by Nokia
parent 662c0a722a
commit 2e4e283d41
1 changed files with 5 additions and 7 deletions

View File

@ -70,8 +70,6 @@ static LibLoadStatus status = NotLoaded;
static UCollator *icuCollator = 0;
#define STRINGIFY2(x) #x
#define STRINGIFY(x) STRINGIFY2(x)
bool qt_initIcu(const QString &localeString)
{
@ -104,9 +102,9 @@ bool qt_initIcu(const QString &localeString)
if (!ptr_ucol_open || !ptr_ucol_close || !ptr_ucol_strcoll) {
// try again with decorated symbol names
ptr_ucol_open = (Ptr_ucol_open)lib.resolve("ucol_open" STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_ucol_close = (Ptr_ucol_close)lib.resolve("ucol_close" STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_ucol_strcoll = (Ptr_ucol_strcoll)lib.resolve("ucol_strcoll" STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_ucol_open = (Ptr_ucol_open)lib.resolve("ucol_open" QT_STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_ucol_close = (Ptr_ucol_close)lib.resolve("ucol_close" QT_STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_ucol_strcoll = (Ptr_ucol_strcoll)lib.resolve("ucol_strcoll" QT_STRINGIFY(U_ICU_VERSION_SUFFIX));
}
if (!ptr_ucol_open || !ptr_ucol_close || !ptr_ucol_strcoll) {
@ -138,8 +136,8 @@ bool qt_initIcu(const QString &localeString)
ptr_u_strToLower = (Ptr_u_strToCase)ucLib.resolve("u_strToLower");
if (!ptr_u_strToUpper || !ptr_u_strToLower) {
ptr_u_strToUpper = (Ptr_u_strToCase)ucLib.resolve("u_strToUpper" STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_u_strToLower = (Ptr_u_strToCase)ucLib.resolve("u_strToLower" STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_u_strToUpper = (Ptr_u_strToCase)ucLib.resolve("u_strToUpper" QT_STRINGIFY(U_ICU_VERSION_SUFFIX));
ptr_u_strToLower = (Ptr_u_strToCase)ucLib.resolve("u_strToLower" QT_STRINGIFY(U_ICU_VERSION_SUFFIX));
}
if (!ptr_u_strToUpper || !ptr_u_strToLower) {