summaryrefslogtreecommitdiff
path: root/Source/WTF/wtf/qt/StringQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WTF/wtf/qt/StringQt.cpp')
-rw-r--r--Source/WTF/wtf/qt/StringQt.cpp7
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