equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
429 QCFString str(CFStringCreateWithBytes(kCFAllocatorDefault, |
429 QCFString str(CFStringCreateWithBytes(kCFAllocatorDefault, |
430 reinterpret_cast<const UInt8 *>(firstData.constData()), |
430 reinterpret_cast<const UInt8 *>(firstData.constData()), |
431 firstData.size(), CFStringGetSystemEncoding(), false)); |
431 firstData.size(), CFStringGetSystemEncoding(), false)); |
432 ret = QString(str); |
432 ret = QString(str); |
433 } else if (flavor == QLatin1String("public.utf16-plain-text")) { |
433 } else if (flavor == QLatin1String("public.utf16-plain-text")) { |
434 ret = QString::fromUtf16(reinterpret_cast<const ushort *>(firstData.constData()), |
434 ret = QString(reinterpret_cast<const QChar *>(firstData.constData()), |
435 firstData.size() / sizeof(ushort)); |
435 firstData.size() / sizeof(QChar)); |
436 } else { |
436 } else { |
437 qWarning("QMime::convertToMime: unhandled mimetype: %s", qPrintable(mimetype)); |
437 qWarning("QMime::convertToMime: unhandled mimetype: %s", qPrintable(mimetype)); |
438 } |
438 } |
439 return ret; |
439 return ret; |
440 } |
440 } |