void ThumbnailGenerator::cacheThumbnail()
{
+#ifndef QT_NO_IMAGE_TEXT
mImage.setText("Thumb::URI" , mOriginalUri);
mImage.setText("Thumb::MTime" , QString::number(mOriginalTime));
mImage.setText("Thumb::Size" , QString::number(mOriginalFileSize));
mImage.setText("Thumb::Image::Width" , QString::number(mOriginalWidth));
mImage.setText("Thumb::Image::Height", QString::number(mOriginalHeight));
mImage.setText("Software" , "Gwenview");
+#endif
emit thumbnailReadyToBeCached(mThumbnailPath, mImage);
}
{
KUrl url = url_;
// Don't include the password if any
- url.setPass(QString::null); //krazy:exclude=nullstrassign for old broken gcc
+ url.setPass(QString());
return url.url();
}
if (!thumb.load(oldPath)) {
return;
}
+#ifndef QT_NO_IMAGE_TEXT
thumb.setText("Thumb::URI", newUri);
+#endif
thumb.save(newPath, "png");
QFile::remove(QFile::encodeName(oldPath));
}
}
int size = ThumbnailGroup::pixelSize(ThumbnailGroup::Normal);
image = largeImage.scaled(size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
+#ifndef QT_NO_IMAGE_TEXT
Q_FOREACH(const QString& key, largeImage.textKeys()) {
QString text = largeImage.text(key);
image.setText(key, text);
}
+#endif
sThumbnailWriter->queueThumbnail(mThumbnailPath, image);
}
LOG("Stat thumb" << mThumbnailPath);
QImage thumb = loadThumbnailFromCache();
+#ifndef QT_NO_IMAGE_TEXT
KIO::filesize_t fileSize = thumb.text(QLatin1String("Thumb::Size")).toULongLong();
if (!thumb.isNull()) {
if (thumb.text(QLatin1String("Thumb::URI")) == mOriginalUri &&
return;
}
}
+#endif
// Thumbnail not found or not valid
if (MimeTypeUtils::fileItemKind(mCurrentItem) == MimeTypeUtils::KIND_RASTER_IMAGE) {