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 ** |
615 // we expect this as utf16 <url><space><title> |
615 // we expect this as utf16 <url><space><title> |
616 // the first part is a url that should only contain ascci char |
616 // the first part is a url that should only contain ascci char |
617 // so it should be safe to check that the second char is 0 |
617 // so it should be safe to check that the second char is 0 |
618 // to verify that it is utf16 |
618 // to verify that it is utf16 |
619 if (data.size() > 1 && data.at(1) == 0) |
619 if (data.size() > 1 && data.at(1) == 0) |
620 return QString::fromUtf16(reinterpret_cast<const ushort *>(data.constData()), |
620 return QString::fromRawData((const QChar *)data.constData(), |
621 data.size() / 2).split(QLatin1Char('\n')).first().toLatin1(); |
621 data.size() / 2).split(QLatin1Char('\n')).first().toLatin1(); |
622 } |
622 } |
623 } |
623 } |
624 |
624 |
625 // special cas for images |
625 // special cas for images |