summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/UString.h38
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSClipboardCustom.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp2
4 files changed, 30 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.cpp
index 885e2d2..b8121d6 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.cpp
@@ -33,7 +33,7 @@ namespace JSC {
{
int id = source.provider()->asID();
- codes.insert(id,source.toString().toQString());
+ codes.insert(id,source.toString());
currentScript.push(id);
scriptRef.insert(id,ScriptActivCount());
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h
index 7edb994..0a53c50 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h
@@ -78,17 +78,6 @@ namespace JSC {
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 {
@@ -376,6 +365,19 @@ namespace JSC {
return m_rep->reserveCapacity(capacity);
}
+#if PLATFORM(QT)
+ operator QString() const
+ {
+ return QString(reinterpret_cast<const QChar*>(this->data()), this->size());
+ }
+
+ UString(const QString& str)
+ {
+ *this = JSC::UString(reinterpret_cast<const UChar*>(str.constData()), str.length());
+ }
+#endif
+
+
private:
void expandCapacity(int requiredLength);
void expandPreCapacity(int requiredPreCap);
@@ -543,6 +545,20 @@ namespace JSC {
return capacityDelta;
}
+#if PLATFORM(QT)
+
+ inline UString operator+(const char* s1, const UString& s2)
+ {
+ return operator+(UString(s1), s2);
+ }
+
+ inline UString operator+(const UString& s1, const char* s2)
+ {
+ return operator+(s1, UString(s2));
+ }
+
+#endif
+
struct IdentifierRepHash : PtrHash<RefPtr<JSC::UString::Rep> > {
static unsigned hash(const RefPtr<JSC::UString::Rep>& key) { return key->computedHash(); }
static unsigned hash(JSC::UString::Rep* key) { return key->computedHash(); }
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSClipboardCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSClipboardCustom.cpp
index 78dca49..73946c8 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSClipboardCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSClipboardCustom.cpp
@@ -59,7 +59,7 @@ JSValue JSClipboard::types(ExecState* exec) const
MarkedArgumentBuffer list;
HashSet<String>::const_iterator end = types.end();
for (HashSet<String>::const_iterator it = types.begin(); it != end; ++it)
- list.append(jsString(exec, UString(*it)));
+ list.append(jsString(exec, it->operator UString()));
return constructArray(exec, list);
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp
index 7caff2b..f4758e4 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp
@@ -97,7 +97,7 @@ void JSLazyEventListener::parseCode() const
ExecState* exec = m_globalObject->globalExec();
MarkedArgumentBuffer args;
- UString sourceURL(executionContext->url().string());
+ UString sourceURL(executionContext->url().string().operator UString());
args.append(jsNontrivialString(exec, m_eventParameterName));
args.append(jsString(exec, m_code));