diff --git a/src/platformsupport/clipboard/qmacmime.mm b/src/platformsupport/clipboard/qmacmime.mm index 317648956c..2e3257cfcf 100644 --- a/src/platformsupport/clipboard/qmacmime.mm +++ b/src/platformsupport/clipboard/qmacmime.mm @@ -403,9 +403,7 @@ QVariant QMacPasteboardMimeUnicodeText::convertToMime(const QString &mimetype, Q // I can only handle two types (system and unicode) so deal with them that way QVariant ret; if (flavor == QLatin1String("public.utf8-plain-text")) { - ret = QString(QCFString(CFStringCreateWithBytes(kCFAllocatorDefault, - reinterpret_cast(firstData.constData()), - firstData.size(), CFStringGetSystemEncoding(), false))); + ret = QString::fromUtf8(firstData); } else if (flavor == QLatin1String("public.utf16-plain-text")) { ret = QString(reinterpret_cast(firstData.constData()), firstData.size() / sizeof(QChar));