diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-12 09:27:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-12 09:27:39 +0200 |
commit | 3749d61e1f7a59f5ec5067e560af1eb610c82015 (patch) | |
tree | 73dc228333948738bbe02976cacca8cd382bc978 /Source/WTF/wtf/qt/StringQt.cpp | |
parent | b32b4dcd9a51ab8de6afc53d9e17f8707e1f7a5e (diff) | |
download | qtwebkit-3749d61e1f7a59f5ec5067e560af1eb610c82015.tar.gz |
Imported WebKit commit a77350243e054f3460d1137301d8b3faee3d2052 (http://svn.webkit.org/repository/webkit/trunk@125365)
New snapshot with build fixes for latest API changes in Qt and all WK1 Win MSVC fixes upstream
Diffstat (limited to 'Source/WTF/wtf/qt/StringQt.cpp')
-rw-r--r-- | Source/WTF/wtf/qt/StringQt.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/WTF/wtf/qt/StringQt.cpp b/Source/WTF/wtf/qt/StringQt.cpp index 43c4f81f0..ad88c03f7 100644 --- a/Source/WTF/wtf/qt/StringQt.cpp +++ b/Source/WTF/wtf/qt/StringQt.cpp @@ -37,11 +37,7 @@ String::String(const QString& qstr) { if (qstr.isNull()) return; -#if HAVE(QT5) m_impl = StringImpl::adopt(const_cast<QString&>(qstr).data_ptr()); -#else - m_impl = StringImpl::create(reinterpret_cast_ptr<const UChar*>(qstr.constData()), qstr.length()); -#endif } String::String(const QStringRef& ref) @@ -56,7 +52,6 @@ String::operator QString() const if (!m_impl) return QString(); -#if HAVE(QT5) if (QStringData* qStringData = m_impl->qStringData()) { // The WTF string was adopted from a QString at some point, so we // can just adopt the QStringData like a regular QString copy. @@ -64,7 +59,7 @@ String::operator QString() const QStringDataPtr qStringDataPointer = { qStringData }; return QString(qStringDataPointer); } -#endif + if (is8Bit() && !m_impl->has16BitShadow()) { // Asking for characters() of an 8-bit string will make a 16-bit copy internally // in WTF::String. Since we're going to copy the data to QStringData anyways, we |