mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
gwenview: minor optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0ca5a4530a
commit
4b105d8244
2 changed files with 4 additions and 6 deletions
|
@ -272,12 +272,11 @@ void ImageMetaInfoModel::setUrl(const KUrl& url)
|
|||
d->setGroupEntryValue(GeneralGroup, "General.Size", sizeString);
|
||||
d->setGroupEntryValue(GeneralGroup, "General.Time", item.timeString());
|
||||
|
||||
KExiv2 kexiv2(url.path());
|
||||
const KExiv2PropertyList kexiv2metadata = kexiv2.metadata();
|
||||
const KExiv2 kexiv2(url.path());
|
||||
KExiv2PropertyList exifprops;
|
||||
KExiv2PropertyList iptcprops;
|
||||
KExiv2PropertyList xmpprops;
|
||||
foreach (const KExiv2Property &kexiv2property, kexiv2metadata) {
|
||||
foreach (const KExiv2Property &kexiv2property, kexiv2.metadata()) {
|
||||
if (kexiv2property.name.startsWith("Exif.")) {
|
||||
exifprops.append(kexiv2property);
|
||||
} else if (kexiv2property.name.startsWith("Xmp.")) {
|
||||
|
|
|
@ -65,8 +65,7 @@ struct CacheItem
|
|||
}
|
||||
|
||||
const QString path = url.path();
|
||||
KExiv2 kexiv2(path);
|
||||
const KExiv2PropertyList kexiv2metadata = kexiv2.metadata();
|
||||
const KExiv2 kexiv2(path);
|
||||
// Ordered list of keys to try
|
||||
static QList<QByteArray> datelst = QList<QByteArray>()
|
||||
<< QByteArray("Exif.Photo.DateTimeOriginal")
|
||||
|
@ -74,7 +73,7 @@ struct CacheItem
|
|||
<< QByteArray("Exif.Photo.DateTimeDigitized")
|
||||
<< QByteArray("Exif.Image.DateTime");
|
||||
QString exifvalue;
|
||||
foreach (const KExiv2Property &kexiv2property, kexiv2metadata) {
|
||||
foreach (const KExiv2Property &kexiv2property, kexiv2.metadata()) {
|
||||
if (datelst.contains(kexiv2property.name)) {
|
||||
exifvalue = kexiv2property.value;
|
||||
if (!exifvalue.isEmpty()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue