A fix for the incorrect processing of relative path names is sitting in
silo 75 at the moment. It's waiting for testing sign-off.

The thumbnailer qml plug-in just does this:

QQuickImageResponse* ThumbnailGenerator::requestImageResponse(const QString& 
id, const QSize& requestedSize)
{
    QString src_path = QUrl(id).path();
    auto request = thumbnailer->getThumbnail(src_path, requestedSize);
    return new ThumbnailerImageResponse(request);
}

So, whatever comes back as the path component of the URL is what we use.
If that path is relative, we interpret it relative to the current
directory. If the QUrl(id).path() call takes care of expanding a
relative qrc path to a path relative to the current dir, or to an
absolute path, things should work. If path() expands it to a relative
path with respect to the directory containing the qrc file, it won't.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to thumbnailer in Ubuntu.
https://bugs.launchpad.net/bugs/1550706

Title:
  Thumbnails not working with qrc

Status in Client Developer Experience:
  New
Status in thumbnailer package in Ubuntu:
  New

Bug description:
  The thumbnailer works only if I load images from the file system, not
  from a resource file:

      Image {
          id: backgroundImage
          anchors.fill: parent
          sourceSize: Qt.size(parent.width, parent.height)
          source: "image://thumbnailer/qrc:///images/menu-background.jpg"
      }

  The default sdk template uses qrc as template.

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-developer-experience/+bug/1550706/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to