| 173 | } |
| 174 | |
| 175 | QString FileCardDelegate::getCacheKey(const QString& path, int thumbnailSize) const |
| 176 | { |
| 177 | QFileInfo fileInfo(path); |
| 178 | if (!fileInfo.exists()) { |
| 179 | return {}; |
| 180 | } |
| 181 | |
| 182 | // create cache key: path:modtime:size |
| 183 | QString modTime = QString::number(fileInfo.lastModified().toSecsSinceEpoch()); |
| 184 | return QStringLiteral("%1:%2:%3").arg(path, modTime, QString::number(thumbnailSize)); |
| 185 | } |
| 186 | |
| 187 | QPixmap FileCardDelegate::loadAndCacheThumbnail(const QString& path, int thumbnailSize) const |
| 188 | { |
nothing calls this directly
no test coverage detected