[Webkit-unassigned] [Bug 104540] New: [Qt] JS bridge does not transmit QVariants anymore in Qt5
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 10 05:49:41 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=104540
Summary: [Qt] JS bridge does not transmit QVariants anymore in
Qt5
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows 7
Status: UNCONFIRMED
Severity: Blocker
Priority: P1
Component: WebKit Qt
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bugzilla at kaffeeschluerfer.com
Windows 7 and Windows XP
Visual Studio 2010
Qt5 RC
(I can not test if any other platforms are affected.)
In Qt 4.7.x and 4.8.x JSON object were transmitted as QVariant into the C++ Slot:
---JavaScript extract:---
var jsonTest = {
service: "LogService",
type: "request",
methodName: "logIt",
count: performCounter
};
this.Bridge.slotQVariant(jsonTest);
---C++ extract---
void JavaScriptConnection::slotQVariant(QVariant data)
{
//... data can be converted to QVariantMap
}
This worked fine, but with Qt5 we get the error 'Trying to construct an instance of an invalid type, type id: 732670891'. It helps to make in JS a 'JSON.stringify(jsonTest)' and to expect a QString in the C++ Slot:
---JavaScript extract:---
var jsonTest = {
//... see above
};
this.Bridge.slotQString(JSON.stringify(jsonTest));
---C++ extract---
void JavaScriptConnection::slotQString(QString data)
{
//...
}
However, this behavior change seems not correct, because (first) it breaks compatability for no reason and (second) it has performance drawbacks on C++ side, because the QString has to be converted.
[Furthermore there's a severe speed decrease, and I do not mean the mentioned conversion, when using the bridge several 10000s of times, but I will post this as a different bug]
As attachment I added a VS2010 project. It's stripped down to the bare problem, so you can hopefully and quickly see the problem. Only the Release build is configured correctly. There is some time measurement on C++ side, but this is of no relevance here.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list