Changeset View
Changeset View
Standalone View
Standalone View
lib/thumbnailprovider/thumbnailgenerator.cpp
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 103 | #endif | |||
---|---|---|---|---|---|
114 | 114 | | |||
115 | // If there's jpeg content (from jpg or raw files), try to load an embedded thumbnail, if available. | 115 | // If there's jpeg content (from jpg or raw files), try to load an embedded thumbnail, if available. | ||
116 | if (!content.rawData().isEmpty()) { | 116 | if (!content.rawData().isEmpty()) { | ||
117 | QImage thumbnail = content.thumbnail(); | 117 | QImage thumbnail = content.thumbnail(); | ||
118 | 118 | | |||
119 | // If the user does not care about the generated thumbnails (by deleting them on exit), use ANY | 119 | // If the user does not care about the generated thumbnails (by deleting them on exit), use ANY | ||
120 | // embedded thumnail, even if it's too small. | 120 | // embedded thumnail, even if it's too small. | ||
121 | if (!thumbnail.isNull() && | 121 | if (!thumbnail.isNull() && | ||
122 | (GwenviewConfig::deleteThumbnailCacheOnExit() || qMax(thumbnail.width(), thumbnail.height()) >= pixelSize) | 122 | (GwenviewConfig::lowResourceUsageMode() || qMax(thumbnail.width(), thumbnail.height()) >= pixelSize) | ||
123 | ) { | 123 | ) { | ||
124 | mImage = std::move(thumbnail); | 124 | mImage = std::move(thumbnail); | ||
125 | mOriginalWidth = content.size().width(); | 125 | mOriginalWidth = content.size().width(); | ||
126 | mOriginalHeight = content.size().height(); | 126 | mOriginalHeight = content.size().height(); | ||
127 | return true; | 127 | return true; | ||
128 | } | 128 | } | ||
129 | } | 129 | } | ||
130 | 130 | | |||
▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines |