[file-qml-plugin] Use Qt classes to get mimetype for files

Bug #1387651 reported by Stefano Verzegnassi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Document Viewer App
Fix Released
Critical
Stefano Verzegnassi

Bug Description

At the moment file-qml-plugin uses an external console command ("file") to get mime type for a file.
This doesn't work due to apparmor policies:

[ 708.702747] type=1400 audit(1414674136.065:61): apparmor="DENIED" operation="exec" profile="com.ubuntu.docviewer_docviewer_0.1.37" name="/usr/bin/file" pid=5479 comm="ubuntu-docviewe" requested_mask="x" denied_mask="x" fsuid=32011 ouid=0

Use QMimeType[1] instead, from Qt5.

Marked as critical, since it's not possible to open a document on a device.

[1]: http://qt-project.org/doc/qt-5/qmimetype.html

Related branches

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-docviewer-app at revision 38, scheduled for release in ubuntu-docviewer-app, milestone 2014-10-30

Changed in ubuntu-docviewer-app:
status: In Progress → Fix Committed
Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

Fix released on the Ubuntu Store with the version 0.1.39 of ubuntu-docviewer-app.

Changed in ubuntu-docviewer-app:
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.