summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/3rdparty/webkit/WebKit.pro6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp9
-rw-r--r--src/script/api/qscriptengine.cpp28
5 files changed, 38 insertions, 9 deletions
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 2047143..ac0c47c 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -82,7 +82,7 @@ CONFIG(QTDIR_build) {
symbian: TARGET =$$TARGET$${QT_LIBINFIX}
}
moduleFile=$$PWD/../WebKit/qt/qt_webkit_version.pri
-include($$moduleFile)
+isEmpty(QT_BUILD_TREE):include($$moduleFile)
VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION}
unix {
diff --git a/src/3rdparty/webkit/WebKit.pro b/src/3rdparty/webkit/WebKit.pro
index c7df391..ef251c5 100644
--- a/src/3rdparty/webkit/WebKit.pro
+++ b/src/3rdparty/webkit/WebKit.pro
@@ -34,3 +34,9 @@ symbian {
}
include(WebKit/qt/docs/docs.pri)
+
+!isEmpty(QT_BUILD_TREE) {
+ QMAKE_SUBSTITUTES += qt_webkit_version
+ qt_webkit_version.input = WebKit/qt/qt_webkit_version.pri
+ qt_webkit_version.output = $$QT_BUILD_TREE/mkspecs/modules/qt_webkit_version.pri
+}
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index d8cf06c..4594d1e 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -2,4 +2,4 @@ QT_WEBKIT_VERSION = 4.7.0
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
QT_WEBKIT_PATCH_VERSION = 0
-QT_CONFIG *= webkit
+QT_CONFIG += webkit
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index a98ce6f..a02f3ac 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5740,16 +5740,11 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent)
}
if (sceneTouchEvent->deviceType() == QTouchEvent::TouchScreen) {
- // on touch-screens, combine this touch point with the closest one we find if it
- // is a a direct descendent or ancestor (
+ // on touch-screens, combine this touch point with the closest one we find
int closestTouchPointId = findClosestTouchPointId(touchPoint.scenePos());
QGraphicsItem *closestItem = itemForTouchPointId.value(closestTouchPointId);
- if (!item
- || (closestItem
- && (item->isAncestorOf(closestItem)
- || closestItem->isAncestorOf(item)))) {
+ if (!item || (closestItem && cachedItemsUnderMouse.contains(closestItem)))
item = closestItem;
- }
}
if (!item)
continue;
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 8560214..8347626 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -782,6 +782,8 @@ static JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState*, JSC::JSOb
static JSC::JSValue JSC_HOST_CALL functionQsTranslateNoOp(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
static JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
static JSC::JSValue JSC_HOST_CALL functionQsTrNoOp(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+static JSC::JSValue JSC_HOST_CALL functionQsTrId(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+static JSC::JSValue JSC_HOST_CALL functionQsTrIdNoOp(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObject*, JSC::JSValue, const JSC::ArgList &args)
{
@@ -892,6 +894,28 @@ JSC::JSValue JSC_HOST_CALL functionQsTrNoOp(JSC::ExecState *, JSC::JSObject*, JS
return args.at(0);
}
+JSC::JSValue JSC_HOST_CALL functionQsTrId(JSC::ExecState *exec, JSC::JSObject*, JSC::JSValue, const JSC::ArgList &args)
+{
+ if (args.size() < 1)
+ return JSC::throwError(exec, JSC::GeneralError, "qsTrId() requires at least one argument");
+ if (!args.at(0).isString())
+ return JSC::throwError(exec, JSC::TypeError, "qsTrId(): first argument (id) must be a string");
+ if ((args.size() > 1) && !args.at(1).isNumber())
+ return JSC::throwError(exec, JSC::TypeError, "qsTrId(): second argument (n) must be a number");
+ JSC::UString id = args.at(0).toString(exec);
+ int n = -1;
+ if (args.size() > 1)
+ n = args.at(1).toInt32(exec);
+ return JSC::jsString(exec, qtTrId(QScript::convertToLatin1(id).constData(), n));
+}
+
+JSC::JSValue JSC_HOST_CALL functionQsTrIdNoOp(JSC::ExecState *, JSC::JSObject*, JSC::JSValue, const JSC::ArgList &args)
+{
+ if (args.size() < 1)
+ return JSC::jsUndefined();
+ return args.at(0);
+}
+
static JSC::JSValue JSC_HOST_CALL stringProtoFuncArg(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL stringProtoFuncArg(JSC::ExecState *exec, JSC::JSObject*, JSC::JSValue thisObject, const JSC::ArgList &args)
@@ -3435,6 +3459,8 @@ void QScriptEngine::registerCustomType(int type, MarshalFunction mf,
\row \o QT_TR_NOOP() \o QT_TR_NOOP()
\row \o qsTranslate() \o QCoreApplication::translate()
\row \o QT_TRANSLATE_NOOP() \o QT_TRANSLATE_NOOP()
+ \row \o qsTrId() (since 4.7) \o qtTrId()
+ \row \o QT_TRID_NOOP() (since 4.7) \o QT_TRID_NOOP()
\endtable
\sa {Internationalization with Qt}
@@ -3453,6 +3479,8 @@ void QScriptEngine::installTranslatorFunctions(const QScriptValue &object)
JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 2, JSC::Identifier(exec, "QT_TRANSLATE_NOOP"), QScript::functionQsTranslateNoOp));
JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 3, JSC::Identifier(exec, "qsTr"), QScript::functionQsTr));
JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 1, JSC::Identifier(exec, "QT_TR_NOOP"), QScript::functionQsTrNoOp));
+ JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 1, JSC::Identifier(exec, "qsTrId"), QScript::functionQsTrId));
+ JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 1, JSC::Identifier(exec, "QT_TRID_NOOP"), QScript::functionQsTrIdNoOp));
glob->stringPrototype()->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 1, JSC::Identifier(exec, "arg"), QScript::stringProtoFuncArg));
}