uri on ContentStore qml binding isn't set before getting the first transfer

Bug #1491411 reported by Didier Roche-Tolomelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
content-hub (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

A simple app with:

    ContentStore {
        id: appContentStore
        scope: ContentScope.App

        Component.onCompleted: console.log(uri)
    }

Doesn't have any appContentStore.uri content and print this warning:
"Accessing ContentStore uri with NULL internal store"

However, the ContentStore uri only depends on the ContentScope associated with it. I wanted to do some cleanups and check on the backend side while fetching it. But setStore() which initialized the uri is only available after the first transfer using that ContentStore.

The C++ side is doing that inside the constructor, I think the QML one should do the same to make ContentStore a little bit more useful.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: content-hub 0.0+15.10.20150813-0ubuntu1
ProcVersionSignature: Ubuntu 4.1.0-3.3-generic 4.1.3
Uname: Linux 4.1.0-3-generic x86_64
ApportVersion: 2.18-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Sep 2 15:47:31 2015
InstallationDate: Installed on 2012-05-28 (1191 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: content-hub
UpgradeStatus: Upgraded to wily on 2014-10-31 (306 days ago)

Tags: devexp
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :
Revision history for this message
Ken VanDine (ken-vandine) wrote :

In further investigation, I see this is actually intentional. The ContentStore has to know the ContentType to properly construct the uri. So this gets set when the transfer uses the store.

To make ContentStore more generally usable, outside of just transfers we should look at solving that. Perhaps we could add an optional property for contentType. We can consider that for the next API bump.

Changed in content-hub (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
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.