Changeset 846 for trunk/src/corelib/tools/qharfbuzz.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/corelib/tools/qharfbuzz.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 103 103 } 104 104 105 void *HB_Library_Resolve(const char *library, const char *symbol)105 void *HB_Library_Resolve(const char *library, const char *symbol) 106 106 { 107 107 #ifdef QT_NO_LIBRARY 108 108 return 0; 109 109 #else 110 return QLibrary::resolve(QLatin1String(library), symbol);110 return QLibrary::resolve(QLatin1String(library), symbol); 111 111 #endif 112 }113 114 void *HB_TextCodecForMib(int mib)115 {116 #ifndef QT_NO_TEXTCODEC117 return QTextCodec::codecForMib(mib);118 #else119 return 0;120 #endif121 }122 123 char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength)124 {125 #ifndef QT_NO_TEXTCODEC126 QByteArray data = reinterpret_cast<QTextCodec *>(codec)->fromUnicode((const QChar *)unicode, length);127 // ### suboptimal128 char *output = (char *)malloc(data.length() + 1);129 Q_CHECK_PTR(output);130 memcpy(output, data.constData(), data.length() + 1);131 if (outputLength)132 *outputLength = data.length();133 return output;134 #else135 return 0;136 #endif137 }138 139 void HB_TextCodec_FreeResult(char *string)140 {141 free(string);142 112 } 143 113
Note:
See TracChangeset
for help on using the changeset viewer.