diff options
author | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2009-08-05 08:12:49 (GMT) |
---|---|---|
committer | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2009-08-05 08:16:54 (GMT) |
commit | 4a3cf019b7261779ca3e8267278bf07947132db4 (patch) | |
tree | ef5f172fc456bd06d76d37c6d9f4ef71caf17c64 | |
parent | f2f593c68f5c4e63fb78cf789f94ed2d42522498 (diff) | |
download | Qt-4a3cf019b7261779ca3e8267278bf07947132db4.zip Qt-4a3cf019b7261779ca3e8267278bf07947132db4.tar.gz Qt-4a3cf019b7261779ca3e8267278bf07947132db4.tar.bz2 |
New UString method. Conversion from UString to QString.
Review by: Kent Hansen
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/UString.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h index d01b75d..bb0e7fb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h @@ -77,6 +77,18 @@ namespace JSC { friend class JIT; public: + +#if PLATFORM(QT) + + QString toQString() const + { + // Not sure with method is better, 2nd is shorter + //UString string + //QString::fromUtf8(string.toString().UTF8String().c_str()) + + return QString(reinterpret_cast<const QChar*>(this->data()), this->size()); + } +#endif typedef CrossThreadRefCounted<OwnFastMallocPtr<UChar> > SharedUChar; struct BaseString; struct Rep : Noncopyable { |