Comment 4 for bug 1550706

Revision history for this message
Michi Henning (michihenning) wrote : Re: Thumbnails not working with qrc

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.