cannot get network status changes with connectivity-api

Bug #1531380 reported by Lorn Potter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
indicator-network (Ubuntu)
Fix Released
High
Pete Woods

Bug Description

Using Nexus 4, Ubuntu 15.04 (r330) (rc-proposed)

The bearer plugin that uses connectivity-api used to work (ubuntu touch) back in November :
https://codereview.qt-project.org/#/c/140752/

It still compiles, but now I get:

2016-01-06T13:28:29 (unknown:0) - QObject::connect: Cannot queue arguments of type 'Status'
(Make sure 'Status' is registered using qRegisterMetaType().)

at the first time the next status changes.

I also tried the connectivity-api example (after fixing up network-status.h include path)
https://developer.ubuntu.com/api/devel/ubuntu-14.10/cplusplus/connectivity-api/networking-status.html

and never receive network status change signal.

Related branches

Revision history for this message
Lorn Potter (lorn-potter) wrote :

Just tried the qml example found here:
https://developer.ubuntu.com/api/apps/qml/sdk-15.04/Ubuntu.Connectivity.NetworkingStatus/

Main.qml:27:5: QML Connections: Cannot assign to non-existent property "onStatusChanged"

shows "Not online" when I am connected.

Revision history for this message
Lorn Potter (lorn-potter) wrote :

For at least the c++ example, it seems the example code connect call should be at least:

    QObject::connect(ns.data(),
                     &NetworkingStatus::statusChanged,
                     [=](NetworkingStatus::Status value)

Revision history for this message
Lorn Potter (lorn-potter) wrote :

 calling something like this:
    QObject::connect(ns.data(),
                     &NetworkingStatus::statusChanged,
                     this, &QUbuntuEngine::networkStatusChanged);
still does not work.

In networking-status.h, the signal should be declared as:

void statusChanged(NetworkingStatus::Status value);

I looked at the code, and I could not find any tests for the public connectivity-api (network-status.h)

Pete Woods (pete-woods)
Changed in indicator-network (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Pete Woods (pete-woods)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-network - 0.7.0+16.04.20160212-0ubuntu1

---------------
indicator-network (0.7.0+16.04.20160212-0ubuntu1) xenial; urgency=medium

  [ Pete Woods ]
  * Fix Connectivity::status property. (LP: #1531380)
  * Add PPTP support to VPN editor.
  * Make ofono dependency optional. (LP: #1521142)
  * Only show the modem menu when there's actually a modem (LP:
    #1541588)

  [ Rodney Dawes ]
  * Change the dependency on indicator-network to a Recommends. (LP:
    #1472186)

 -- Pete Woods <email address hidden> Fri, 12 Feb 2016 14:27:33 +0000

Changed in indicator-network (Ubuntu):
status: In Progress → 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.