Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/corelib/tools/qharfbuzz.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    103103}
    104104
    105 void *HB_Library_Resolve(const char *library, const char *symbol)
     105void *HB_Library_Resolve(const char *library, const char *symbol)
    106106{
    107107#ifdef QT_NO_LIBRARY
    108108    return 0;
    109109#else
    110     return QLibrary::resolve(QLatin1String(library), symbol);
     110    return QLibrary::resolve(QLatin1String(library), symbol);
    111111#endif
    112 }
    113 
    114 void *HB_TextCodecForMib(int mib)
    115 {
    116 #ifndef QT_NO_TEXTCODEC
    117     return QTextCodec::codecForMib(mib);
    118 #else
    119     return 0;
    120 #endif
    121 }
    122 
    123 char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength)
    124 {
    125 #ifndef QT_NO_TEXTCODEC
    126     QByteArray data = reinterpret_cast<QTextCodec *>(codec)->fromUnicode((const QChar *)unicode, length);
    127     // ### suboptimal
    128     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 #else
    135     return 0;
    136 #endif
    137 }
    138 
    139 void HB_TextCodec_FreeResult(char *string)
    140 {
    141     free(string);
    142112}
    143113
Note: See TracChangeset for help on using the changeset viewer.