From 2e4e283d41766b558f91fe19bc8bbc3bb765154f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 23 May 2012 15:57:06 +0200 Subject: [PATCH] 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 Reviewed-by: Denis Dzyubenko --- src/corelib/tools/qlocale_icu.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/corelib/tools/qlocale_icu.cpp b/src/corelib/tools/qlocale_icu.cpp index b3b8836..eac80b2 100644 --- a/src/corelib/tools/qlocale_icu.cpp +++ b/src/corelib/tools/qlocale_icu.cpp @@ -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) { -- 2.7.4