mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 14:49:44 -09:00
imports/activitymanager: Use PreviewJob::generated (QImage) for thumbnail
This skips the conversion of the thumbnail to a QPixmap. It consumes the QImage directly.
This commit is contained in:
parent
0619f46200
commit
ed3dd702e5
1 changed files with 2 additions and 4 deletions
|
|
@ -118,13 +118,11 @@ ThumbnailImageResponse::ThumbnailImageResponse(const QString &id, const QSize &r
|
|||
|
||||
connect(
|
||||
job,
|
||||
&KIO::PreviewJob::gotPreview,
|
||||
&KIO::PreviewJob::generated,
|
||||
this,
|
||||
[this, file](const KFileItem &item, const QPixmap &pixmap) {
|
||||
[this, file](const KFileItem &item, const QImage &image) {
|
||||
Q_UNUSED(item);
|
||||
|
||||
auto image = pixmap.toImage();
|
||||
|
||||
m_texture = QQuickTextureFactory::textureFactoryForImage(image);
|
||||
Q_EMIT finished();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue