ubuntu-touch-coreapps team mailing list archive
-
ubuntu-touch-coreapps team
-
Mailing list archive
-
Message #00816
Re: [Docviewer] Reviewing docviewer's Content Hub branch
The same message to everyone else if there's more input about Content-Hub
workings....
On Tue, Nov 4, 2014 at 5:38 PM, Stefano Verzegnassi <stefano92.100@xxxxxxxxx
> wrote:
> Arto, it would be very appreciated if you could provide further
> informations on the issues you found.
>
Hi, basically I tested your branch and it works great for what I tired! So
that's awesome, I'm very happy about that. I can open for example text
files from FileManager in DocViewer without issues
The potential problem I was talking about - and I tried to make a merge
request, but ran out of time to make it work, so I'm writing it here
instead - is that Content-Hub seems to notify about transfer beginning and
it being ready. So Docviewer currently assumes that when Content-Hub says
onImportRequested that it is at that moment ready (state ==
ContentTransfer.Charged).
Now from my understanding of the Content-Hub examples is that's not
necessarily the case. Instead you should check onImportRequested whether
it's already ready, and be prepared to listen for additional signals on
the transfer for when it's ready.
Anyone correct if I'm wrong, this is what I've gathered from the examples
of Content-Hub.
For example:
id: root
property var activeTransfer
function _transferIfReady() {
if (transfer.state === ContentHub.ContentTransfer.Charged) {
file.path =
root.activeTransfer.items[0].url.toString().replace("file://", "");
}
}
Connections {
target: ContentHub.ContentHub
onImportRequested: {
console.log("[CONTENT-HUB] Incoming Import Request")
root.activeTransfer = transfer
_transferIfReady()
}
}
}
Connections {
target: root.activeTransfer
onStateChanged: {
console.log("StateChanged: " + root.activeTransfer.state);
_transferIfReady()
}
}
On Tue, Nov 4, 2014 at 9:12 PM, Stefano Verzegnassi <stefano92.100@xxxxxxxxx
> wrote:
> Problem solved, I found the solution in the address-book-app[1][2].
> Now the branch is really ready for a review.
>
> Please review (and approve, if it's ok) this branch first:
>
> https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/fix-1387651-1387023/+merge/240304
> The branch has some bugfixes related to qml-file-plugin and
> qml-poppler-plugin.
> In details:
> * Fixed a problem with AppArmor while trying to get mime type for a
> file with QProcess and /usr/bin/file. (lp:1387651
> <https://code.launchpad.net/bugs/1387651>)
> * Added creation date property in file-qml-plugin (lp:1387023
> <https://code.launchpad.net/bugs/1387023>)
> * Workaround for an issue in poppler-qml-plugin (PDF pages were
> loaded twice)
>
> And a bugfix for manifest.json.in:
> * Now 'architecture' field value in manifest.json.in is set by CMake
> while building the project.
>
>
> Then merge this branch:
>
> https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/content-hub-support/+merge/240331
> This is the branch related to ContentHub.
> I suggest you to install the latest revision of filemanager-app on your
> device, which provides the support for the ContentTypes used by
> docviewer-app.
>
> Thank you again!
>
> Cheers,
> Stefano
>
> [1]
> http://bazaar.launchpad.net/~phablet-team/address-book-app/trunk/view/head:/src/imports/ContentHubProxy.qml
> [2] lines 159-169:
> http://bazaar.launchpad.net/~phablet-team/address-book-app/trunk/view/head:/src/imports/MainWindow.qml
>
> 2014-11-04 16:38 GMT+01:00 Stefano Verzegnassi <stefano92.100@xxxxxxxxx>:
>
>> Hi all,
>>
>> There are still some issue with my MP that I'd like to solve or at least
>> workaround.
>> While exporting a file from an external source (e.g. filemanager),
>> Content Hub's ContentPeerPicker is still visible on background, even if its
>> parent page has been deleted from the pageStack.
>> I've already found a workaround for it, but I don't like very much its
>> implementation (it's about moving the WelcomePage outside the page stack,
>> so it can be shown/hidden through its 'visible' property).
>> Probably, I will end up using a "custom" implementation of
>> ContentPeerPicker, using a ContentPeerModel as base.
>>
>> Another problem is about the "Creation time" info in the Details page.
>> Since Content Hub creates a local copy of the requested file, the
>> creation time is equal to the time of the import request (and this makes
>> the information useless in a confined environment).
>>
>> There are some little fine adjustments I'd like to see before releasing
>> docviewer on the store: e.g. I think that the app still needs some
>> improvements on code readibility.
>>
>> I've tried to open all the supported type of file on my device and I
>> haven't found any relevant issue while importing files through
>> filemanager-app.
>> Arto, it would be very appreciated if you could provide further
>> informations on the issues you found.
>> Feel free to comment on my MP[1] or on this mailing list.
>>
>> Thank you all!
>>
>> Cheers,
>> Stefano
>>
>> [1]
>> https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/content-hub-support/+merge/240331
>>
>>
>
References