Summary: | Wrong sql statement updating thumbnail modification date | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Alvaro Soliverez <asoliverez> |
Component: | Database-Thumbs | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | 4.7.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/digikam/5d2fcc5dd65724cc1e37f645956eb8d1010e861e | Version Fixed In: | 4.9.0 |
Sentry Crash Report: |
Description
Alvaro Soliverez
2015-03-10 20:22:49 UTC
Code managing thumbnails database is located here : https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/show/libs/database/core Look all thumbnail* files. Gilles Caulier Here is the culprit. The parameter order in that line is wrong. https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/database/core/thumbnaildb.cpp#L282 Git commit 5d2fcc5dd65724cc1e37f645956eb8d1010e861e by Gilles Caulier. Committed on 10/03/2015 at 21:43. Pushed by cgilles into branch 'master'. fix inverted parameters to update thumbnail date in database FIXED-IN: 4.9.0 M +5 -5 libs/database/core/thumbnaildb.cpp http://commits.kde.org/digikam/5d2fcc5dd65724cc1e37f645956eb8d1010e861e Git commit c88f5f53bca3aa0bb29fed90edb92b5ea3598ce1 by Gilles Caulier. Committed on 10/03/2015 at 21:48. Pushed by cgilles into branch 'frameworks'. backport commit #5d2fcc5dd65724cc1e37f645956eb8d1010e861e from git/master to frameworks branch M +4 -4 libs/database/core/thumbnaildb.cpp http://commits.kde.org/digikam/c88f5f53bca3aa0bb29fed90edb92b5ea3598ce1 diff --git a/libs/database/core/thumbnaildb.cpp b/libs/database/core/thumbnaildb.cpp index e330d83..76b782f 100644 --- a/libs/database/core/thumbnaildb.cpp +++ b/libs/database/core/thumbnaildb.cpp @@ -255,9 +255,9 @@ DatabaseCoreBackend::QueryState ThumbnailDB::insertThumbnail(const DatabaseThumb { QVariant id; DatabaseCoreBackend::QueryState lastQueryState; - lastQueryState= d->db->execSql(QLatin1String("INSERT INTO Thumbnails (type, modificationDate, orientationHint, data) VALUES (?, ?, ?, ?);"), - info.type, info.modificationDate, info.orientationHint, info.data, - 0, &id); + lastQueryState = d->db->execSql(QLatin1String("INSERT INTO Thumbnails (type, modificationDate, orientationHint, data) VALUES (?, ?, ?, ?);"), + info.type, info.modificationDate, info.orientationHint, info.data, + 0, &id); if (DatabaseCoreBackend::NoErrors == lastQueryState) { @@ -279,7 +279,7 @@ DatabaseCoreBackend::QueryState ThumbnailDB::replaceThumbnail(const DatabaseThum DatabaseCoreBackend::QueryState ThumbnailDB::updateModificationDate(int thumbId, const QDateTime& modificationDate) { - return d->db->execSql(QLatin1String("UPDATE Thumbnails SET modificationDate=? WHERE id=?;"), thumbId, modificationDate); + return d->db->execSql(QLatin1String("UPDATE Thumbnails SET modificationDate=? WHERE id=?;"), modificationDate, thumbId); } void ThumbnailDB::replaceUniqueHash(const QString& oldUniqueHash, int oldFileSize, |