diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/embedded/qscreenqnx_qws.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 2 | ||||
-rw-r--r-- | src/script/api/qscriptengine.cpp | 16 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/gui/embedded/qscreenqnx_qws.cpp b/src/gui/embedded/qscreenqnx_qws.cpp index 705db7e..a0a697f 100644 --- a/src/gui/embedded/qscreenqnx_qws.cpp +++ b/src/gui/embedded/qscreenqnx_qws.cpp @@ -205,7 +205,7 @@ static bool createMemSurface(QQnxScreenContext * const d, int w, int h) int ret = gf_surface_create(&d->memSurface, d->device, w, h, GF_FORMAT_ARGB8888, 0, GF_SURFACE_CREATE_CPU_FAST_ACCESS | GF_SURFACE_CREATE_CPU_LINEAR_ACCESSIBLE - | GF_SURFACE_PHYS_CONTIG); + | GF_SURFACE_PHYS_CONTIG | GF_SURFACE_CREATE_SHAREABLE); if (ret != GF_ERR_OK) { qWarning("QQnxScreen: gf_surface_create(%dx%d) failed with error code %d", w, h, ret); diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index bc7684a..83b7d4c 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -690,6 +690,8 @@ void QHttpNetworkConnectionChannel::detectPipeliningSupport() && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4.")) && (!serverHeaderField.contains("Microsoft-IIS/5.")) && (!serverHeaderField.contains("Netscape-Enterprise/3.")) + // this is adpoted from the knowledge of the Nokia 7.x browser team (DEF143319) + && (!serverHeaderField.contains("WebLogic")) ) { pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported; } else { diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 2422108..ccd3e56 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -41,6 +41,7 @@ #include <QtCore/qstringlist.h> #include <QtCore/qmetaobject.h> +#include "CodeBlock.h" #include "Error.h" #include "JSArray.h" #include "JSLock.h" @@ -699,9 +700,18 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number"); #ifndef QT_NO_QOBJECT QString context; - QScriptContext *ctx = QScriptEnginePrivate::contextForFrame(exec); - if (ctx && ctx->parentContext()) - context = QFileInfo(QScriptContextInfo(ctx->parentContext()).fileName()).baseName(); + // The first non-empty source URL in the call stack determines the translation context. + { + JSC::ExecState *frame = exec->removeHostCallFrameFlag(); + while (frame) { + if (frame->codeBlock() && frame->codeBlock()->source() + && !frame->codeBlock()->source()->url().isEmpty()) { + context = QFileInfo(frame->codeBlock()->source()->url()).baseName(); + break; + } + frame = frame->callerFrame()->removeHostCallFrameFlag(); + } + } #endif QString text(args.at(0).toString(exec)); #ifndef QT_NO_QOBJECT |