[Qt 5.5] OxideQSslCertificate::issuer doesn't work in Qml

Bug #1488364 reported by Chris Coulson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Medium
Zoltan Balogh
Oxide
Triaged
Medium
Unassigned
qtdeclarative-opensource-src (Ubuntu)
Fix Released
Undecided
Unassigned
qtdeclarative-opensource-src (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

With older Qt versions, we use private APIs (QQmlValueType and friends) for exposing value types. However, with the built-in gadget support in Qt5.5, OxideQSslCertificate::issuer() is no longer working correctly.

- When OxideQSecurityStatus::certificate() returns a null QVariant, the value gets converted to null in Qml. When it returns a QVariant containing OxideQSslCertificate, this gets correctly converted to a value type in Qml.
- The QVariant returned from OxideQSslCertificate::issuer() gets converted to an object in Qml (verified with typeof), and calling toString() on the object gives "QVariant(QVariant): undefined".

Changed in oxide:
importance: Undecided → Medium
status: New → Triaged
summary: - [Qt 5.5] OxideQSslCertificate::issuer is never null from Qml
+ [Qt 5.5] OxideQSslCertificate::issuer doesn't work in Qml
description: updated
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

The difference appears to be that QObjectWrapper passes the QVariant returned from OxideQSecurityStatus::certificate to QV8Engine::fromVariant, whereas QmlValueTypeWrapper boxes the QVariant returned from OxideQSslCertificate::issuer in another QVariant and passes that QV8Engine::fromVariant.

I guess this is why I had to do http://bazaar.launchpad.net/~oxide-developers/oxide/oxide.trunk/view/head:/qt/qmlplugin/oxide_qml_ssl_certificate.cc#L76 for < Qt 5.5.

I'll try and come up with a small testcase and report this upstream.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I've reported this with a test case to https://bugreports.qt.io/browse/QTBUG-47940

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Backporting to https://codereview.qt-project.org/#/c/147514/. Ticket opened at https://requests.ci-train.ubuntu.com/#/ticket/1313 but there's a previous qtdeclarative landing first.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Please test from the mentioned ticket, silo 042, and report back.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I can confirm that the packages in silo 42 fix the 4 test failures in tst_SslCertificate.qml. Tested on xenial amd64.

Changed in canonical-devices-system-image:
importance: Undecided → Medium
assignee: nobody → Zoltan Balogh (bzoltan)
milestone: none → 11
Changed in canonical-devices-system-image:
status: New → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

This bug was fixed in the package qtdeclarative-opensource-src 5.4.1-1ubuntu11~overlay6~1 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

qtdeclarative-opensource-src (5.4.1-1ubuntu11~overlay6~1) vivid; urgency=medium

  * debian/patches/QML-do-not-wrap-property-values-of-type-QVariant.patch:
    - Make certain QVariant properties accessible from QML. A backport
      from Qt 5.6.0. (LP: #1488364)

 -- Timo Jyrinki <email address hidden> Mon, 25 Apr 2016 13:12:47 +0000

Changed in qtdeclarative-opensource-src (Ubuntu RTM):
status: New → Fix Released
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtdeclarative-opensource-src - 5.5.1-2ubuntu7

---------------
qtdeclarative-opensource-src (5.5.1-2ubuntu7) yakkety; urgency=medium

  [ Timo Jyrinki ]
  * debian/patches/QML-do-not-wrap-property-values-of-type-QVariant.patch:
    - Make certain QVariant properties accessible from QML. A backport
      from Qt 5.6.0. (LP: #1488364)

  [ Jon Boden ]
  * Update symbols for ubuntuBSD (LP: #1579350)

 -- Timo Jyrinki <email address hidden> Thu, 19 May 2016 11:44:07 +0000

Changed in qtdeclarative-opensource-src (Ubuntu):
status: New → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.