Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: DBusInterface::GetThumbnail(): ap.png: unity::ResourceException: Thumbnailer::get_thumbnail():
boost::filesystem::canonical: No such file or directory: "/image.png"
qrc:///Main.qml:19:5: QML QQuickImage: Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: DBusInterface::GetThumbnail(): ap.png: unity::ResourceException: Thumbnailer::get_thumbnail():
boost::filesystem::canonical: No such file or directory: "/image.png"
=> As stated before, putting media into a qrc file is the way the default template in the SDK suggests to do it (in order to not bother the developer with finding the apparmor confined paths on the phone) and thus should probably also work with the thumbnailer.
As the thumbnailer is remote process and thus won't have access to the in-binary resources files, the QQmlImageProvider could perhaps extract them from the binary, provide them to the thumbnailer and delete the temporarily extracted original file again.
I just confirmed this with a snippet of code:
Works:
Image {
width: 100
height: 100
sourceSize: Qt.size(width, height)
source: "/image.png"
}
Works:
Image { //thumbnailer/ file:// /image. png"
width: 100
height: 100
sourceSize: Qt.size(width, height)
source: "image:
}
Works:
Image {
width: 100
height: 100
sourceSize: Qt.size(width, height)
source: "qrc:///image.png"
}
Fails:
Image { //thumbnailer/ qrc:/// image.png"
width: 100
height: 100
sourceSize: Qt.size(width, height)
source: "image:
}
This throws the following error:
Thumbnailer: RequestImpl: :dbusCallFinish ed(): D-Bus error: DBusInterface: :GetThumbnail( ): ap.png: unity:: ResourceExcepti on: Thumbnailer: :get_thumbnail( ): :filesystem: :canonical: No such file or directory: "/image.png" Main.qml: 19:5: QML QQuickImage: Thumbnailer: RequestImpl: :dbusCallFinish ed(): D-Bus error: DBusInterface: :GetThumbnail( ): ap.png: unity:: ResourceExcepti on: Thumbnailer: :get_thumbnail( ): :filesystem: :canonical: No such file or directory: "/image.png"
boost:
qrc:///
boost:
=> As stated before, putting media into a qrc file is the way the default template in the SDK suggests to do it (in order to not bother the developer with finding the apparmor confined paths on the phone) and thus should probably also work with the thumbnailer.
As the thumbnailer is remote process and thus won't have access to the in-binary resources files, the QQmlImageProvider could perhaps extract them from the binary, provide them to the thumbnailer and delete the temporarily extracted original file again.